diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-29 13:31:45 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-29 13:31:45 +0000 |
commit | 8c38a749feba7593d146377ac6e4b090f8228e64 (patch) | |
tree | 6669be5ff4f09369c112a9414601eed81edc9d25 /crawl-ref/source/item_use.cc | |
parent | d1a6e695915d4d649f3517f4c131f940c7aacc8f (diff) | |
download | crawl-ref-8c38a749feba7593d146377ac6e4b090f8228e64.tar.gz crawl-ref-8c38a749feba7593d146377ac6e4b090f8228e64.zip |
Fix good random secondary choices during character selection.
Re-enable quivering with '(' - still buggy, and I'm trying to work out
why, but at least it works for some ammo now.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6218 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index d2ebcec981..becf94c833 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1276,10 +1276,17 @@ int get_next_fire_item(int current, int direction) for (unsigned i = 0; i < fire_order.size(); i++) { +#ifdef DEBUG_QUIVER + mprf(MSGCH_DIAGNOSTICS, "i: %d, slot: %d", i, fire_order[i]); +#endif if (fire_order[i] == current) { unsigned next = - (i + fire_order.size() + direction) % fire_order.size(); + (i + direction + fire_order.size()) % fire_order.size(); +#ifdef DEBUG_QUIVER + mprf(MSGCH_DIAGNOSTICS, "i: %d (%d), next: %d (%d), size: %d", + i, current, next, fire_order[next], fire_order.size()); +#endif return fire_order[next]; } } |