diff options
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r-- | crawl-ref/source/spells1.cc | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index a030b98b68..b90f3533cc 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -561,21 +561,25 @@ bool stinking_cloud( int pow, bolt &beem ) beem.is_beam = false; beem.aux_source.clear(); - // Fire tracer. - beem.source_x = you.x_pos; - beem.source_y = you.y_pos; - beem.can_see_invis = player_see_invis(); - beem.smart_monster = true; - beem.attitude = ATT_FRIENDLY; - beem.fr_count = 0; - beem.is_tracer = true; - fire_beam(beem); - - if (beem.fr_count > 0) + // Don't bother tracing if you're targetting yourself. + if (beem.target_x != you.x_pos || beem.target_y != you.y_pos) { - // We don't want to fire through friendlies. - canned_msg(MSG_OK); - return (false); + // Fire tracer. + beem.source_x = you.x_pos; + beem.source_y = you.y_pos; + beem.can_see_invis = player_see_invis(); + beem.smart_monster = true; + beem.attitude = ATT_FRIENDLY; + beem.fr_count = 0; + beem.is_tracer = true; + fire_beam(beem); + + if (beem.fr_count > 0) + { + // We don't want to fire through friendlies. + canned_msg(MSG_OK); + return (false); + } } // Really fire. |