diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-08 16:32:01 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-08 16:32:01 +0000 |
commit | eaf7223fd1f012bbded158188eb5019d5fbf77b6 (patch) | |
tree | 0e251869bad36cb539e7d3efa536de42ceb60a49 /crawl-ref/source/item_use.cc | |
parent | 84037f974ff847067e0fd3d8672ac06ae6ed1edd (diff) | |
download | crawl-ref-eaf7223fd1f012bbded158188eb5019d5fbf77b6.tar.gz crawl-ref-eaf7223fd1f012bbded158188eb5019d5fbf77b6.zip |
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
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 11 |
1 files changed, 5 insertions, 6 deletions
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. |