From f5ad2d06f0bac4de0a61d97b8887b70616006969 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Tue, 15 Dec 2009 00:01:58 +0100 Subject: Make mimics hold the item they're mimicking, instead of fragile hacks with saving RNG state. --- crawl-ref/source/tilepick.cc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source/tilepick.cc') 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; -- cgit v1.2.3-54-g00ecf