diff options
author | Simon Howard | 2008-09-28 17:02:31 +0000 |
---|---|---|
committer | Simon Howard | 2008-09-28 17:02:31 +0000 |
commit | 0c74071858b7dc8df708519b1efffbf18d6ad954 (patch) | |
tree | 6384cd51440a2f052e53ded851678ab3f3a221a7 | |
parent | 32cdd54be55325983a087e3bd9461c1069b3a43c (diff) | |
download | chocolate-doom-0c74071858b7dc8df708519b1efffbf18d6ad954.tar.gz chocolate-doom-0c74071858b7dc8df708519b1efffbf18d6ad954.tar.bz2 chocolate-doom-0c74071858b7dc8df708519b1efffbf18d6ad954.zip |
Make the joybspeed autorun hack work in Heretic.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1303
-rw-r--r-- | src/heretic/g_game.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c index 53f57026..364d25ea 100644 --- a/src/heretic/g_game.c +++ b/src/heretic/g_game.c @@ -161,6 +161,8 @@ int mousex, mousey; // mouse values are used once int dclicktime, dclickstate, dclicks; int dclicktime2, dclickstate2, dclicks2; +#define MAX_JOY_BUTTONS 20 + int joyxmove, joyymove; // joystick values are repeated boolean joyarray[5]; boolean *joybuttons = &joyarray[1]; // allow [-1] @@ -238,8 +240,9 @@ void G_BuildTiccmd(ticcmd_t * cmd) strafe = gamekeydown[key_strafe] || mousebuttons[mousebstrafe] || joybuttons[joybstrafe]; - speed = gamekeydown[key_speed] || joybuttons[joybspeed] - || joybuttons[joybspeed]; + speed = joybspeed >= MAX_JOY_BUTTONS + || gamekeydown[key_speed] + || joybuttons[joybspeed]; #ifdef __WATCOMC__ if (useexterndriver) { |