diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-12-15 00:01:58 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-12-15 00:06:49 +0100 |
commit | f5ad2d06f0bac4de0a61d97b8887b70616006969 (patch) | |
tree | 58296a0761e58ecc58107a6ea530fbbd7ccccd84 /crawl-ref/source/stash.cc | |
parent | 08b32044b9fe15e1026a463da9d3d4cad19b3942 (diff) | |
download | crawl-ref-f5ad2d06f0bac4de0a61d97b8887b70616006969.tar.gz crawl-ref-f5ad2d06f0bac4de0a61d97b8887b70616006969.zip |
Make mimics hold the item they're mimicking, instead of fragile hacks with saving RNG state.
Diffstat (limited to 'crawl-ref/source/stash.cc')
-rw-r--r-- | crawl-ref/source/stash.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc index 9eb534b0ff..cb3a461b61 100644 --- a/crawl-ref/source/stash.cc +++ b/crawl-ref/source/stash.cc @@ -380,21 +380,16 @@ void Stash::update() // There's something on this square. Take a squint at it. const item_def *pitem; - item_def mimic_item; if (_grid_has_mimic_item(p)) - { - get_mimic_item(monster_at(p), mimic_item); - pitem = &mimic_item; - } + pitem = &get_mimic_item(monster_at(p)); else { pitem = &mitm[igrd(p)]; + tutorial_first_item(*pitem); } const item_def& item = *pitem; - tutorial_first_item(item); - if (!_grid_has_perceived_multiple_items(p)) items.clear(); |