From bb3b8b8286b84de95546d1121d0c305bbdc85851 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 20 Apr 2009 09:37:00 +0000 Subject: * Fix non-prompting when firing through allies. * Don't autopickup chunks if starving. (Yes, I died because of that. Xom was very much amused...) * Some spacing fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9668 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/item_use.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 9e57ea98e6..19d7fda3af 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2360,6 +2360,11 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, // Don't do the tracing when using Portaled Projectile, or when confused. if (!teleport && !you.confused()) { + // Set values absurdly high to make sure the tracer will + // complain if we're attempting to fire through allies. + pbolt.hit = 100; + pbolt.damage = dice_def(1, 100); + // Init tracer variables. pbolt.foe_info.reset(); pbolt.friend_info.reset(); @@ -2378,6 +2383,8 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, delete pbolt.special_explosion; return (false); } + pbolt.hit = 0; + pbolt.damage = dice_def(); } pbolt.is_tracer = false; -- cgit v1.2.3-54-g00ecf