summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 40c39454aa..254c1c17ac 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -120,10 +120,10 @@ bool move_player_to_grid( const coord_def& p, bool stepped, bool allow_shift,
ASSERT( you.can_pass_through_feat( new_grid ) );
// Better not be an unsubmerged monster either.
- ASSERT(swapping && mgrd(p) != NON_MONSTER
- || !swapping && (mgrd(p) == NON_MONSTER
- || menv[ mgrd(p) ].submerged()
- || feawn_passthrough(&menv[mgrd(p)])));
+ ASSERT(swapping && monster_at(p)
+ || !swapping && (!monster_at(p)
+ || monster_at(p)->submerged()
+ || feawn_passthrough(monster_at(p))));
// Don't prompt if force is true.
if (!force)