From 230d9542b2d023d68b21c1533777d22850eeb350 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sat, 6 Sep 2008 12:54:17 +0000 Subject: [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 --- crawl-ref/source/transfor.cc | 7 +++++-- 1 file 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(); -- cgit v1.2.3-54-g00ecf