summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-flags.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-11-26 10:39:08 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-11-27 00:51:03 +0100
commite9f04152f692786698ac769cb448d1c871d6bca9 (patch)
tree8434a692fc527ba10d51ff135ff9429a4b7f433b /crawl-ref/source/mon-flags.h
parent21bfb98905bc6b7aba60f273e60605455d84b42c (diff)
downloadcrawl-ref-e9f04152f692786698ac769cb448d1c871d6bca9.tar.gz
crawl-ref-e9f04152f692786698ac769cb448d1c871d6bca9.zip
Make ENCH_SLEEPY a flag rather an enchantment.
This way it can get cleared a lot faster: we have a loop to remove it from every monster every turn, which shows up this prominently on qw profiles: [4] 59.6 0.07 14.57 21662 handle_monsters(bool) [4] 0.31 9.15 1263185/2072593 monster::del_ench(enchant_type, bool, bool) This commit merely optimizes it without improving the complexity: inventing some field last_slept could allow setting this only when the monster gets hibernated. For now I went the easy but lame way; having the query encapsulated means a stronger optimization can be done easier.
Diffstat (limited to 'crawl-ref/source/mon-flags.h')
-rw-r--r--crawl-ref/source/mon-flags.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-flags.h b/crawl-ref/source/mon-flags.h
index 3dad7dfcaf..68a860cc5a 100644
--- a/crawl-ref/source/mon-flags.h
+++ b/crawl-ref/source/mon-flags.h
@@ -235,4 +235,5 @@ const uint64_t MF_NAME_NOCORPSE = BIT(34); // mname should not be used for
const uint64_t MF_SEEN_RANGED = BIT(35); // known to have a ranged attack
const uint64_t MF_POLYMORPHED = BIT(36); // this monster has been polymorphed.
+const uint64_t MF_JUST_SLEPT = BIT(37); // just got hibernated/slept
#endif