From e7a6987931173ad13d9be69bbd7c089fb982972d Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sun, 29 Jun 2008 04:06:06 +0000 Subject: [2005471] Fixing bug where discovered trap was not being shown until a turn later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6202 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 64a89331bf..746b2f6948 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -158,6 +158,12 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, if (random2( skill ) > 6) { + id = trap_at_xy( x, y ); + if (id != -1) + grd[x][y] = trap_category( env.trap[id].type ); + + viewwindow(true, false); + mprf( MSGCH_WARN, "Wait a moment, %s! Do you really want to step there?", you.your_name ); @@ -169,10 +175,6 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, you.turn_is_over = false; - id = trap_at_xy( x, y ); - if (id != -1) - grd[x][y] = trap_category( env.trap[id].type ); - return (false); } } -- cgit v1.2.3-54-g00ecf