summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc36
1 files changed, 17 insertions, 19 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index a2dbfe1fdd..2307435db5 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1199,18 +1199,8 @@ static void throw_it(struct bolt &pbolt, int throw_2)
bool launched = false; // item is launched
bool thrown = false; // item is sensible thrown item
- // Making a copy of the item: changed only for venom launchers
- item_def item = you.inv[throw_2];
- item.quantity = 1;
- item.slot = index_to_letter(item.link);
- origin_set_unknown(item);
-
- char str_pass[ ITEMNAME_SIZE ];
-
mpr( STD_DIRECTION_PROMPT, MSGCH_PROMPT );
-
message_current_target();
-
direction( thr, DIR_NONE, TARG_ENEMY );
if (!thr.isValid)
@@ -1221,6 +1211,23 @@ static void throw_it(struct bolt &pbolt, int throw_2)
return;
}
+ // Must unwield before fire_beam() makes a copy in order to remove things
+ // like temporary branding. -- bwr
+ if (throw_2 == you.equip[EQ_WEAPON] && you.inv[throw_2].quantity == 1)
+ {
+ unwield_item( throw_2 );
+ you.equip[EQ_WEAPON] = -1;
+ canned_msg( MSG_EMPTY_HANDED );
+ }
+
+ // Making a copy of the item: changed only for venom launchers
+ item_def item = you.inv[throw_2];
+ item.quantity = 1;
+ item.slot = index_to_letter(item.link);
+ origin_set_unknown(item);
+
+ char str_pass[ ITEMNAME_SIZE ];
+
if (you.conf)
{
thr.isTarget = true;
@@ -1713,15 +1720,6 @@ static void throw_it(struct bolt &pbolt, int throw_2)
mpr( info, MSGCH_DIAGNOSTICS );
#endif
- // Must unwield before fire_beam() makes a copy in order to remove things
- // like temporary branding. -- bwr
- if (throw_2 == you.equip[EQ_WEAPON] && you.inv[throw_2].quantity == 1)
- {
- unwield_item( throw_2 );
- you.equip[EQ_WEAPON] = -1;
- canned_msg( MSG_EMPTY_HANDED );
- }
-
// create message
if (launched)
strcpy(info, "You shoot ");