From 3a08f4ea63af6471ab7edaffa65cd2f5eafb141c Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 31 Dec 2008 04:39:36 +0000 Subject: Simplify. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8055 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 0d13389caa..ea3118f5ec 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1281,9 +1281,7 @@ void monster_die(monsters *monster, killer_type killer, && mons_can_be_zombified(monster) && gives_xp) { - const int type = monster->type; - const monster_type spectre_type = mons_species(type); - const std::string name_plain = monster->name(DESC_PLAIN); + const monster_type spectre_type = mons_species(monster->type); // Don't allow 0-headed hydras to become spectral hydras. if (spectre_type != MONS_HYDRA || monster->number != 0) @@ -1300,14 +1298,14 @@ void monster_die(monsters *monster, killer_type killer, if (death_message) mpr("A glowing mist starts to gather..."); - if (mons_is_unique(type)) + if (mons_is_unique(monster->type)) { - menv[spectre].mname = name_plain; + menv[spectre].mname = monster->name(DESC_PLAIN); // Special case for Blork the orc: shorten // his name to "Blork" to avoid mentions of // "Blork the orc the spectral orc". - if (type == MONS_BLORK_THE_ORC) + if (monster->type == MONS_BLORK_THE_ORC) menv[spectre].mname = "Blork"; } } -- cgit v1.2.3-54-g00ecf