summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/effects.cc6
-rw-r--r--crawl-ref/source/mon-util.cc6
2 files changed, 4 insertions, 8 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 94a6019e5d..6479059e7a 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -342,8 +342,7 @@ void immolation(int pow, int caster, coord_def where, bool known,
else
{
beam.thrower = KILL_MON;
- beam.beam_source =
- monster_index(dynamic_cast<const monsters*>(attacker));
+ beam.beam_source = attacker->mindex();
}
beam.explode();
@@ -391,8 +390,7 @@ void cleansing_flame(int pow, int caster, coord_def where,
else
{
beam.thrower = KILL_MON;
- beam.beam_source =
- monster_index(dynamic_cast<const monsters*>(attacker));
+ beam.beam_source = attacker->mindex();
}
beam.explode();
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index a097aa3ae4..3e03b2cec2 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -5980,10 +5980,7 @@ int monsters::hurt(const actor *agent, int amount, beam_type flavour,
else if (agent->atype() == ACT_PLAYER)
monster_die(this, KILL_YOU, NON_MONSTER);
else
- {
- monster_die(this, KILL_MON,
- monster_index(dynamic_cast<const monsters*>(agent)));
- }
+ monster_die(this, KILL_MON, agent->mindex());
}
return (amount);
@@ -7503,6 +7500,7 @@ bool monsters::visible_to(const actor *looker) const
else
{
const monsters* mon = dynamic_cast<const monsters*>(looker);
+
return mons_monster_visible(mon, this);
}
}