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.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index ae724e2077..cafe7b5978 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1297,6 +1297,7 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
}
coord_def pos(1, 0);
+ bool large_change = false;
if (is_controlled)
{
@@ -1338,6 +1339,9 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
if (pos.x != you.x_pos || pos.y != you.y_pos)
clear_trapping_net();
+ if (!see_grid(pos))
+ large_change = true;
+
you.moveto(pos.x, pos.y);
if (grd[you.x_pos][you.y_pos] != DNGN_FLOOR
@@ -1346,6 +1350,7 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
|| env.cgrid[you.x_pos][you.y_pos] != EMPTY_CLOUD)
{
is_controlled = false;
+ large_change = false;
}
else
{
@@ -1378,7 +1383,10 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
else if ( see_grid(newx, newy) )
mpr("Your surroundings seem slightly different.");
else
+ {
mpr("Your surroundings suddenly seem different.");
+ large_change = true;
+ }
you.x_pos = newx;
you.y_pos = newy;
@@ -1387,6 +1395,9 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
you.moveto(you.pos());
}
+ if (large_change)
+ handle_interrupted_swap(true);
+
return !is_controlled;
}