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/tilepick.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/tilepick.cc')
-rw-r--r-- | crawl-ref/source/tilepick.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 0e95c17d07..b8ac8a5941 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -769,12 +769,7 @@ int tileidx_monster_base(const monsters *mon, bool detected) case MONS_ARMOUR_MIMIC: case MONS_SCROLL_MIMIC: case MONS_POTION_MIMIC: - { - // Use item tile. - item_def item; - get_mimic_item( mon, item ); - return tileidx_item(item); - } + return tileidx_item(get_mimic_item(mon)); case MONS_DANCING_WEAPON: { @@ -4696,9 +4691,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected) t0 |= TILE_FLAG_S_UNDER; } - item_def item; - get_mimic_item( mon, item ); - if (item_needs_autopickup(item)) + if (item_needs_autopickup(get_mimic_item(mon)) { if (foreground) env.tile_bg[ep.x][ep.y] |= TILE_FLAG_CURSOR3; |