summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-02 07:59:12 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-02 07:59:12 +0000
commit07eadf8e4cf3dd61fa66d194720143685ab84174 (patch)
tree60ca13a09c47d9c6a7b0d871bac374f057134e85 /crawl-ref/source/files.cc
parentd03bcac5636625a61db20500a51418227316b34b (diff)
downloadcrawl-ref-07eadf8e4cf3dd61fa66d194720143685ab84174.tar.gz
crawl-ref-07eadf8e4cf3dd61fa66d194720143685ab84174.zip
Merge r7717 and r7718: improvements to interrupted butchery behaviour.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7719 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 3a25835dde..fac6710599 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -23,6 +23,7 @@
*/
#include "AppHdr.h"
+#include "delay.h"
#include "files.h"
#include "version.h"
@@ -1340,6 +1341,18 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
if (load_mode != LOAD_VISITOR)
dungeon_events.fire_event(DET_ENTERED_LEVEL);
+ if (load_mode == LOAD_ENTER_LEVEL)
+ {
+ // If butchering was interrupted by switching levels (banishment)
+ // then switch back from butchering tool if there's no hostiles
+ // nearby.
+ handle_interrupted_swap(true);
+
+ // Forget about interrupted butchering, since we probably aren't going
+ // to get back to the corpse in time to finish things.
+ you.attribute[ATTR_WEAPON_SWAP_INTERRUPTED] = 0;
+ }
+
return just_created_level;
} // end load()