diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-08-15 06:04:33 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-08-15 06:17:27 -0400 |
commit | 324a815a5ffc7ac85b993c07d9862ee75051d1a3 (patch) | |
tree | c76d99b834c83a8d8de200c366e40407ab5da59d | |
parent | cae07587094ea5d3ded186413b03e8385445ca47 (diff) | |
download | crawl-ref-324a815a5ffc7ac85b993c07d9862ee75051d1a3.tar.gz crawl-ref-324a815a5ffc7ac85b993c07d9862ee75051d1a3.zip |
fix monster specs of random zombies and such (6070)
for instance, "base draconian zombie" and "any simulacrum" would cause a
crash
-rw-r--r-- | crawl-ref/source/mapdef.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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<monster_type>(base_monster.type); spec.number = base_monster.number; |