diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-22 21:03:01 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-22 21:03:01 +0000 |
commit | 42d8d07399655f768c9547ed3f47f39623856291 (patch) | |
tree | cc2250fa7e40fc89e88d83de33644885ff301718 /crawl-ref/source/acr.cc | |
parent | 910f0c606fea238e7382a713e0d465ae189c05ce (diff) | |
download | crawl-ref-42d8d07399655f768c9547ed3f47f39623856291.tar.gz crawl-ref-42d8d07399655f768c9547ed3f47f39623856291.zip |
Fix 2603266: Additional '(' needed for cycling ammo after emptying the
previously quivered stack.
FR 2594741: Make ')' cycle quiver backwards.
The previous behaviour has been moved to '}'.
The equipped inventory listing ']' now also includes the quivered item(s).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9164 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r-- | crawl-ref/source/acr.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index f0d0feeb78..381003f459 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -1870,10 +1870,11 @@ void process_command( command_type cmd ) break; case CMD_CYCLE_QUIVER_FORWARD: + case CMD_CYCLE_QUIVER_BACKWARD: { - int cur; - you.m_quiver->get_desired_item(NULL, &cur); - const int next = get_next_fire_item(cur, +1); + int dir = (cmd == CMD_CYCLE_QUIVER_FORWARD ? +1 : -1); + int cur = you.m_quiver->get_fire_item(); + const int next = get_next_fire_item(cur, dir); #ifdef DEBUG_QUIVER mprf(MSGCH_DIAGNOSTICS, "next slot: %d, item: %s", next, next == -1 ? "none" : you.inv[next].name(DESC_PLAIN).c_str()); |