summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-11-14 18:25:33 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-11-14 18:25:33 +0100
commit983afd1a349b820b4e2ff47a03e665ad0d6693d6 (patch)
tree3ec0c29b623818dcfeb1fdc15c4e58566d7c33a9 /crawl-ref/source/item_use.cc
parent6aad7a2a186bc80f8055013e1c667c57d105b91d (diff)
downloadcrawl-ref-983afd1a349b820b4e2ff47a03e665ad0d6693d6.tar.gz
crawl-ref-983afd1a349b820b4e2ff47a03e665ad0d6693d6.zip
Fix a bad assertion when throwing something with a non-weapon wielded.
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index e9a0160bea..6e80713c97 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -2312,11 +2312,9 @@ void throw_noise(actor* act, const bolt &pbolt, const item_def &ammo)
{
const item_def* launcher = act->weapon();
- if (launcher == NULL)
+ if (launcher == NULL || launcher->base_type != OBJ_WEAPONS)
return;
- ASSERT(launcher->base_type == OBJ_WEAPONS);
-
if (is_launched(act, launcher, ammo) != LRET_LAUNCHED)
return;