summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/env.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-01-04 15:10:07 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-01-05 06:11:45 +0100
commit010988d48063d0871b13aad29e01c9d2ddb9fecb (patch)
tree8168180ae6575b2975ba2562b7be14c3a1c6eb6e /crawl-ref/source/env.h
parentbfe88e149a7e6552c236df1b5867156c3099e0fc (diff)
downloadcrawl-ref-010988d48063d0871b13aad29e01c9d2ddb9fecb.tar.gz
crawl-ref-010988d48063d0871b13aad29e01c9d2ddb9fecb.zip
A temporary speed-up to actor_by_mid().
It can be done better, but for now, I prefer a simpler solution. This can be turned into an efficient no extra memory hash, etc, later. Also, this is the only non-debug interface so it's trivial to change the implementation.
Diffstat (limited to 'crawl-ref/source/env.h')
-rw-r--r--crawl-ref/source/env.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/env.h b/crawl-ref/source/env.h
index 957dc4c4a0..3286154d65 100644
--- a/crawl-ref/source/env.h
+++ b/crawl-ref/source/env.h
@@ -108,6 +108,9 @@ struct crawl_environment
// Volatile level flags, not saved.
uint32_t level_state;
+ // Mapping mid->mindex until the transition is finished.
+ std::map<mid_t, unsigned short> mid_cache;
+
// Temp stuff.
std::vector<final_effect> final_effects;
};