From eaf7223fd1f012bbded158188eb5019d5fbf77b6 Mon Sep 17 00:00:00 2001 From: haranp Date: Thu, 8 Nov 2007 16:32:01 +0000 Subject: Fix 1824176: firing will now only ask for confirmation when you actually fire. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2813 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/item_use.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (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 b2b438c811..955cbd4ac5 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1244,8 +1244,7 @@ static bool fire_item_matches(const item_def &item, unsigned fire_type) static bool fire_item_okay(const item_def &item, unsigned flags) { return (fire_item_matches(item, flags) - && !(you.equip[EQ_WEAPON] == item.link && item_cursed(item)) - && check_warning_inscriptions(item, OPER_FIRE)); + && !(you.equip[EQ_WEAPON] == item.link && item_cursed(item))); } static int find_fire_item_matching(unsigned fire_type, int start, @@ -1426,8 +1425,6 @@ static bool choose_fire_target(dist &target, int &item) void shoot_thing(void) { - struct bolt beam; // passed in by reference, but never used here - if (you.duration[DUR_BERSERKER]) { canned_msg(MSG_TOO_BERSERK); @@ -1445,9 +1442,11 @@ void shoot_thing(void) } dist target; + bolt beam; if (choose_fire_target(target, item)) - throw_it( beam, item, false, 0, &target ); -} // end shoot_thing() + if (check_warning_inscriptions(you.inv[item], OPER_FIRE)) + throw_it( beam, item, false, 0, &target ); +} // Returns delay multiplier numerator (denominator should be 100) for the // launcher with the currently equipped shield. -- cgit v1.2.3-54-g00ecf