summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/transfor.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-06 12:54:17 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-06 12:54:17 +0000
commit230d9542b2d023d68b21c1533777d22850eeb350 (patch)
tree64d0813868e0a5b5b99a82945484703c3b1c99c7 /crawl-ref/source/transfor.cc
parent3f3384869c8751bd4a62654a0e32abb797287455 (diff)
downloadcrawl-ref-230d9542b2d023d68b21c1533777d22850eeb350.tar.gz
crawl-ref-230d9542b2d023d68b21c1533777d22850eeb350.zip
[2088488] Apply move_player_to_grid on untransform only if the untransform caused loss of flight/lev.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6888 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r--crawl-ref/source/transfor.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index 2c0ca22f41..fa89bd8620 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -555,7 +555,7 @@ bool transform(int pow, transformation_type which_trans, bool quiet)
if (check_for_cursed_equipment(rem_stuff, quiet))
return (false);
-
+
if (check_transformation_stat_loss(rem_stuff, quiet))
return (false);
@@ -667,6 +667,8 @@ bool transform_can_butcher_barehanded(transformation_type tt)
void untransform(void)
{
+ const flight_type old_flight = you.flight_mode();
+
you.redraw_evasion = true;
you.redraw_armour_class = true;
you.wield_change = true;
@@ -767,7 +769,8 @@ void untransform(void)
}
// Re-check terrain now that be may no longer be flying.
- move_player_to_grid(you.pos(), false, true, true);
+ if (old_flight && you.flight_mode() == FL_NONE)
+ move_player_to_grid(you.pos(), false, true, true);
if (transform_can_butcher_barehanded(old_form))
stop_butcher_delay();