diff options
-rw-r--r-- | crawl-ref/source/externs.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/travel.cc | 14 |
3 files changed, 17 insertions, 3 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index dbe192d304..d0d3349e4e 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -473,8 +473,8 @@ public: // Returns true if we're currently resting. bool is_rest() const; - bool is_explore() const; + bool is_any_travel() const; // Clears run state. void clear(); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 108462a7e1..6101429dc0 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -160,8 +160,8 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, mprf( MSGCH_WARN, "Wait a moment, %s! Do you really want to step there?", you.your_name ); - - more(); + if (!you.running.is_any_travel()) + more(); exercise( SK_TRAPS_DOORS, 3 ); diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 2822672f93..ddd295e162 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -3882,6 +3882,20 @@ bool runrest::is_explore() const return (runmode == RMODE_EXPLORE || runmode == RMODE_EXPLORE_GREEDY); } +bool runrest::is_any_travel() const +{ + switch (runmode) + { + case RMODE_INTERLEVEL: + case RMODE_EXPLORE_GREEDY: + case RMODE_EXPLORE: + case RMODE_TRAVEL: + return (true); + default: + return (false); + } +} + void runrest::rest() { // stop_running() Lua hooks will never see rest stops. |