summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-12 13:13:40 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-12 13:13:40 +0000
commited3c8c2ae59a947f065499f63daa03fec3a6840d (patch)
treefa2d6529968da6fa33359f3961697b6e405c65b3 /crawl-ref/source/spells3.cc
parent2368157486f9e3c0806d3d79e939fbc3533eb105 (diff)
downloadcrawl-ref-ed3c8c2ae59a947f065499f63daa03fec3a6840d.tar.gz
crawl-ref-ed3c8c2ae59a947f065499f63daa03fec3a6840d.zip
Clearing trapping nets moved into player::moveto() and level change.
This fixes some bugs (e.g. Portal spell and nets interact properly.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9036 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc14
1 files changed, 1 insertions, 13 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index a80762d568..ce60981602 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1323,10 +1323,6 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
if (is_controlled)
{
- // no longer held in net
- if (pos != you.pos())
- clear_trapping_net();
-
if (!see_grid(pos))
large_change = true;
@@ -1390,10 +1386,6 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
|| env.cgrid(newpos) != EMPTY_CLOUD
|| need_distance_check && (newpos - centre).abs() < 34*34);
- // no longer held in net
- if (newpos != you.pos())
- clear_trapping_net();
-
if ( newpos == you.pos() )
mpr("Your surroundings flicker for a moment.");
else if ( see_grid(newpos) )
@@ -1404,11 +1396,7 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
large_change = true;
}
- you.position = newpos;
-
- // Necessary to update the view centre.
- you.moveto(you.pos());
-
+ you.moveto(newpos);
}
if (large_change)