From 324a815a5ffc7ac85b993c07d9862ee75051d1a3 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 15 Aug 2014 06:04:33 -0400 Subject: fix monster specs of random zombies and such (6070) for instance, "base draconian zombie" and "any simulacrum" would cause a crash --- crawl-ref/source/mapdef.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc index bc2af73b26..c46b6a58cf 100644 --- a/crawl-ref/source/mapdef.cc +++ b/crawl-ref/source/mapdef.cc @@ -4207,6 +4207,15 @@ void mons_list::get_zombie_type(string s, mons_spec &spec) const mons_spec base_monster = mons_by_name(s); if (base_monster.type < 0) base_monster.type = MONS_PROGRAM_BUG; + + monster_type dummy_mons = MONS_PROGRAM_BUG; + coord_def dummy_pos; + dungeon_char_type dummy_feat; + level_id place = level_id::current(); + base_monster.type = resolve_monster_type(base_monster.type, dummy_mons, + PROX_ANYWHERE, &dummy_pos, 0, + &dummy_feat, &place); + spec.monbase = static_cast(base_monster.type); spec.number = base_monster.number; -- cgit v1.2.3