summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 4a102a0ce3..032f3bb2a7 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -679,6 +679,10 @@ static bool teleport_player( bool allow_control, bool new_abyss_area )
if (is_controlled)
{
+ // no longer held in net
+ if (plox[0] != you.x_pos || plox[1] != you.y_pos)
+ clear_trapping_net();
+
you.moveto(plox[0], plox[1]);
if ((grd[you.x_pos][you.y_pos] != DNGN_FLOOR
@@ -709,6 +713,10 @@ static bool teleport_player( bool allow_control, bool new_abyss_area )
&& grd[newx][newy] != DNGN_SHALLOW_WATER)
|| mgrd[newx][newy] != NON_MONSTER
|| env.cgrid[newx][newy] != EMPTY_CLOUD);
+
+ // no longer held in net
+ if (newx != you.x_pos || newy != you.y_pos)
+ clear_trapping_net();
if ( newx == you.x_pos && newy == you.y_pos )
mpr("Your surroundings flicker for a moment.");