From 983afd1a349b820b4e2ff47a03e665ad0d6693d6 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Sat, 14 Nov 2009 18:25:33 +0100 Subject: Fix a bad assertion when throwing something with a non-weapon wielded. --- crawl-ref/source/item_use.cc | 4 +--- 1 file changed, 1 insertion(+), 3 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 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; -- cgit v1.2.3-54-g00ecf