From 5d67b7dd209ef2db81de963d877fc54916694939 Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 19 Jan 2009 23:07:02 +0000 Subject: Fix monster targeting yet again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8604 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/effects.cc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 2f67cdffd6..56c89402fa 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -329,9 +329,6 @@ void immolation(int pow, int caster, coord_def where, bool known, beam.effect_known = known; beam.affects_items = (caster != IMMOLATION_SCROLL); - const monsters *atk = (attacker->atype() == ACT_PLAYER ? NULL : - dynamic_cast(attacker)); - if (caster == IMMOLATION_GENERIC || attacker == NULL) { beam.thrower = KILL_MISC; @@ -345,7 +342,8 @@ void immolation(int pow, int caster, coord_def where, bool known, else { beam.thrower = KILL_MON; - beam.beam_source = monster_index(atk); + beam.beam_source = + monster_index(dynamic_cast(attacker)); } beam.explode(); @@ -380,11 +378,7 @@ void cleansing_flame(int pow, int caster, coord_def where, beam.ex_size = 2; beam.is_explosion = true; - const monsters *atk = (attacker->atype() == ACT_PLAYER ? NULL : - dynamic_cast(attacker)); - - if (caster == CLEANSING_FLAME_GENERIC || caster == CLEANSING_FLAME_TSO - || attacker == NULL) + if (caster == CLEANSING_FLAME_GENERIC || caster == CLEANSING_FLAME_TSO) { beam.thrower = KILL_MISC; beam.beam_source = NON_MONSTER; @@ -397,7 +391,8 @@ void cleansing_flame(int pow, int caster, coord_def where, else { beam.thrower = KILL_MON; - beam.beam_source = monster_index(atk); + beam.beam_source = + monster_index(dynamic_cast(attacker)); } beam.explode(); -- cgit v1.2.3-54-g00ecf