diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-11-14 18:25:33 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-11-14 18:25:33 +0100 |
commit | 983afd1a349b820b4e2ff47a03e665ad0d6693d6 (patch) | |
tree | 3ec0c29b623818dcfeb1fdc15c4e58566d7c33a9 /crawl-ref | |
parent | 6aad7a2a186bc80f8055013e1c667c57d105b91d (diff) | |
download | crawl-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')
-rw-r--r-- | crawl-ref/source/item_use.cc | 4 |
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; |