diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-28 19:42:10 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-28 19:42:10 +0000 |
commit | a779df188c0b4ad71e013c87abc18fa1d9e20cd1 (patch) | |
tree | 5f3325ccb8b8281f492fbafc487bd2edfa2ad0a2 /crawl-ref/source/files.cc | |
parent | 21c54e7245bb00f366db098092362e9c84f2e59b (diff) | |
download | crawl-ref-a779df188c0b4ad71e013c87abc18fa1d9e20cd1.tar.gz crawl-ref-a779df188c0b4ad71e013c87abc18fa1d9e20cd1.zip |
[1800818] Fixed broken follower tagging for bazaars.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2247 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r-- | crawl-ref/source/files.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index b428ea85b1..2e69a145c1 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -777,13 +777,9 @@ static void clear_clouds() env.cgrid.init(EMPTY_CLOUD); } -static bool level_type_allows_followers(level_area_type type) -{ - return (type == LEVEL_DUNGEON || type == LEVEL_PANDEMONIUM); -} - static void grab_followers() { + const bool can_follow = level_type_allows_followers(you.level_type); for (int i = you.x_pos - 1; i < you.x_pos + 2; i++) { for (int j = you.y_pos - 1; j < you.y_pos + 2; j++) @@ -808,11 +804,18 @@ static void grab_followers() if (!testbits( fmenv->flags, MF_TAKING_STAIRS )) continue; + if (!can_follow) + { + // Monster can't follow us, so clear the follower flag. + fmenv->flags &= ~MF_TAKING_STAIRS; + continue; + } + #if DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "%s is following.", - fmenv->name(DESC_CAP_THE, true).c_str()); + mprf(MSGCH_DIAGNOSTICS, "%s is following to %s.", + fmenv->name(DESC_CAP_THE, true).c_str(), + level_id::current().describe().c_str()); #endif - fmenv->set_transit(level_id::current()); fmenv->destroy_inventory(); monster_cleanup(fmenv); @@ -865,7 +868,6 @@ bool load( dungeon_feature_type stair_taken, int load_mode, { grab_followers(); - if (old_level_type == LEVEL_DUNGEON) save_level( old_level, LEVEL_DUNGEON, where_were_you2 ); } |