diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-10 16:18:59 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-10 16:18:59 +0000 |
commit | 5a45e3bd8e7330880429c24955d9c4af1ec3608e (patch) | |
tree | 93827f3a07ee60143314d06b8951cde75f145277 /crawl-ref/source/quiver.cc | |
parent | 9c54579bf00656ac37b4bed56fe710399f723c8f (diff) | |
download | crawl-ref-5a45e3bd8e7330880429c24955d9c4af1ec3608e.tar.gz crawl-ref-5a45e3bd8e7330880429c24955d9c4af1ec3608e.zip |
Fix occasional jelly crash on unarmed characters.
Fix quiver hanging on unthrowable missiles (e.g. javelins, nets for small
species).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6478 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/quiver.cc')
-rw-r--r-- | crawl-ref/source/quiver.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/quiver.cc b/crawl-ref/source/quiver.cc index da0ee0305b..e40a76159a 100644 --- a/crawl-ref/source/quiver.cc +++ b/crawl-ref/source/quiver.cc @@ -234,6 +234,7 @@ void player_quiver::on_item_fired(const item_def& item, bool explicitly_chosen) // Don't do anything if this item is not really fit for throwing. if (projected == LRET_FUMBLED) return; + #ifdef DEBUG_QUIVER mprf(MSGCH_DIAGNOSTICS, "item %s is for throwing", item.name(DESC_PLAIN).c_str()); @@ -405,6 +406,10 @@ void player_quiver::_get_fire_order( std::vector<int>& order, if (you.equip[EQ_WEAPON] == i_inv) continue; + // Don't do anything if this item is not really fit for throwing. + if (is_launched(&you, you.weapon(), item) == LRET_FUMBLED) + continue; + // =f prevents item from being in fire order. if (!ignore_inscription_etc && strstr(item.inscription.c_str(), "=f")) @@ -415,6 +420,7 @@ void player_quiver::_get_fire_order( std::vector<int>& order, for (unsigned int i_flags = 0; i_flags < Options.fire_order.size(); i_flags++) { + if (_item_matches(item, (fire_type) Options.fire_order[i_flags], launcher)) { |