diff options
author | Simon Howard | 2008-10-12 15:41:15 +0000 |
---|---|---|
committer | Simon Howard | 2008-10-12 15:41:15 +0000 |
commit | 1901777acea62666bf6007b6ccce6f1f4cdb65dc (patch) | |
tree | e779c6d3c00dd3011d34e9df3955a9d8a3255c15 /src | |
parent | a2fe8877266400976ef738e0ffc3d6ecfc8b1535 (diff) | |
download | chocolate-doom-1901777acea62666bf6007b6ccce6f1f4cdb65dc.tar.gz chocolate-doom-1901777acea62666bf6007b6ccce6f1f4cdb65dc.tar.bz2 chocolate-doom-1901777acea62666bf6007b6ccce6f1f4cdb65dc.zip |
Fix autorun hack for Hexen.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1355
Diffstat (limited to 'src')
-rw-r--r-- | src/hexen/g_game.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/hexen/g_game.c b/src/hexen/g_game.c index 5aae6063..22cc3e3d 100644 --- a/src/hexen/g_game.c +++ b/src/hexen/g_game.c @@ -148,8 +148,10 @@ 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 joyarray[MAX_JOY_BUTTONS + 1]; boolean *joybuttons = &joyarray[1]; // allow [-1] int savegameslot; @@ -215,10 +217,17 @@ void G_BuildTiccmd(ticcmd_t * cmd) //printf ("cons: %i\n",cmd->consistancy); - strafe = gamekeydown[key_strafe] || mousebuttons[mousebstrafe] - || joybuttons[joybstrafe]; - speed = gamekeydown[key_speed] || joybuttons[joybspeed] + strafe = gamekeydown[key_strafe] + || mousebuttons[mousebstrafe] + || joybuttons[joybstrafe]; + + // Allow joybspeed hack. + + speed = key_speed >= NUMKEYS + || joybspeed >= MAX_JOY_BUTTONS + || gamekeydown[key_speed] || joybuttons[joybspeed]; + #ifdef __WATCOMC__ if (useexterndriver) { |