diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 27 | ||||
-rw-r--r-- | crawl-ref/source/stuff.cc | 2 |
2 files changed, 23 insertions, 6 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 37709f9e40..5c3cf95dcd 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -35,6 +35,7 @@ #include "beam.h" #include "cloud.h" #include "debug.h" +#include "delay.h" #include "describe.h" #include "dgnevent.h" #include "fight.h" @@ -5035,13 +5036,29 @@ forget_it: // movement is towards the player. -- bwr if (testbits( monster->flags, MF_TAKING_STAIRS )) { + const delay_type delay = current_delay_action(); + if (delay != DELAY_ASCENDING_STAIRS + && delay != DELAY_DESCENDING_STAIRS) + { + monster->flags &= ~MF_TAKING_STAIRS; + +#ifdef DEBUG_DIAGNOSTICS + mprf(MSGCH_DIAGNOSTICS, + "BUG: %s was marked as follower when not following!", + monster->name(DESC_PLAIN).c_str()); +#endif + } + else + { + mmov_x = 0; + mmov_y = 0; + #if DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, - "%s is skipping movement in order to follow.", - monster->name(DESC_CAP_THE).c_str() ); + mprf(MSGCH_DIAGNOSTICS, + "%s is skipping movement in order to follow.", + monster->name(DESC_CAP_THE).c_str() ); #endif - mmov_x = 0; - mmov_y = 0; + } } // check for attacking another monster diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index 1b6afe54dd..62554faf59 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -147,7 +147,7 @@ void tag_followers( void ) #if DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "%s is marked for following.", fmenv->name(DESC_CAP_THE, true).c_str() ); -#endif +#endif } } } |