Restructured some ticcmd stuff, temporary keyboard defaults, commented out mouse options menu
No more weapon number buttons, button constants reordered, and BT_JUMP renamed to BT_DRIFT, and removed a lot of commented out stuff or stuff we didn't need. Spectator-only support for looking up/down soon. Keyboard defaults are just what I use, plan on adjusting it further after more feedback
This commit is contained in:
parent
6f1dda7b7a
commit
f6cfcd4f89
10
src/b_bot.c
10
src/b_bot.c
|
@ -44,8 +44,8 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
||||||
if (tails->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
if (tails->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
||||||
{
|
{
|
||||||
dist = P_AproxDistance(tails->x-sonic->x, tails->y-sonic->y);
|
dist = P_AproxDistance(tails->x-sonic->x, tails->y-sonic->y);
|
||||||
if (sonic->player->cmd.buttons & BT_JUMP && sonic->player->pflags & (PF_JUMPED|PF_MACESPIN|PF_ITEMHANG))
|
if (sonic->player->cmd.buttons & BT_DRIFT && sonic->player->pflags & (PF_JUMPED|PF_MACESPIN|PF_ITEMHANG))
|
||||||
cmd->buttons |= BT_JUMP;
|
cmd->buttons |= BT_DRIFT;
|
||||||
if (sonic->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
if (sonic->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
||||||
{
|
{
|
||||||
cmd->forwardmove = sonic->player->cmd.forwardmove;
|
cmd->forwardmove = sonic->player->cmd.forwardmove;
|
||||||
|
@ -53,7 +53,7 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
||||||
if (sonic->angle < tails->angle)
|
if (sonic->angle < tails->angle)
|
||||||
cmd->angleturn = -cmd->angleturn;
|
cmd->angleturn = -cmd->angleturn;
|
||||||
} else if (dist > FixedMul(512*FRACUNIT, tails->scale))
|
} else if (dist > FixedMul(512*FRACUNIT, tails->scale))
|
||||||
cmd->buttons |= BT_JUMP;
|
cmd->buttons |= BT_DRIFT;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ void B_BuildTiccmd(player_t *player, ticcmd_t *cmd)
|
||||||
if (player->playerstate == PST_DEAD)
|
if (player->playerstate == PST_DEAD)
|
||||||
{
|
{
|
||||||
if (B_CheckRespawn(player))
|
if (B_CheckRespawn(player))
|
||||||
cmd->buttons |= BT_JUMP;
|
cmd->buttons |= BT_DRIFT;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward
|
||||||
cmd->sidemove += MAXPLMOVE<<FRACBITS>>16;
|
cmd->sidemove += MAXPLMOVE<<FRACBITS>>16;
|
||||||
}
|
}
|
||||||
if (jump)
|
if (jump)
|
||||||
cmd->buttons |= BT_JUMP;
|
cmd->buttons |= BT_DRIFT;
|
||||||
if (spin)
|
if (spin)
|
||||||
cmd->buttons |= BT_BRAKE;
|
cmd->buttons |= BT_BRAKE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,7 +259,7 @@ consvar_t cv_skipmapcheck = {"skipmapcheck", "Off", CV_SAVE, CV_OnOff, NULL, 0,
|
||||||
|
|
||||||
INT32 cv_debug;
|
INT32 cv_debug;
|
||||||
|
|
||||||
consvar_t cv_usemouse = {"use_mouse", "On", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_usemouse = {"use_mouse", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_usemouse2 = {"use_mouse2", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse2, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_usemouse2 = {"use_mouse2", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse2, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
#if defined (DC) || defined (_XBOX) || defined (WMINPUT) || defined (_WII) //joystick 1 and 2
|
#if defined (DC) || defined (_XBOX) || defined (WMINPUT) || defined (_WII) //joystick 1 and 2
|
||||||
|
@ -770,8 +770,8 @@ void D_RegisterClientCommands(void)
|
||||||
CV_RegisterVar(&cv_crosshair2);
|
CV_RegisterVar(&cv_crosshair2);
|
||||||
CV_RegisterVar(&cv_crosshair3);
|
CV_RegisterVar(&cv_crosshair3);
|
||||||
CV_RegisterVar(&cv_crosshair4);
|
CV_RegisterVar(&cv_crosshair4);
|
||||||
CV_RegisterVar(&cv_alwaysfreelook);
|
//CV_RegisterVar(&cv_alwaysfreelook);
|
||||||
CV_RegisterVar(&cv_alwaysfreelook2);
|
//CV_RegisterVar(&cv_alwaysfreelook2);
|
||||||
|
|
||||||
// g_input.c
|
// g_input.c
|
||||||
CV_RegisterVar(&cv_sideaxis);
|
CV_RegisterVar(&cv_sideaxis);
|
||||||
|
@ -815,8 +815,8 @@ void D_RegisterClientCommands(void)
|
||||||
CV_RegisterVar(&cv_mousesens2);
|
CV_RegisterVar(&cv_mousesens2);
|
||||||
CV_RegisterVar(&cv_mouseysens);
|
CV_RegisterVar(&cv_mouseysens);
|
||||||
CV_RegisterVar(&cv_mouseysens2);
|
CV_RegisterVar(&cv_mouseysens2);
|
||||||
CV_RegisterVar(&cv_mousemove);
|
//CV_RegisterVar(&cv_mousemove);
|
||||||
CV_RegisterVar(&cv_mousemove2);
|
//CV_RegisterVar(&cv_mousemove2);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_usejoystick);
|
CV_RegisterVar(&cv_usejoystick);
|
||||||
CV_RegisterVar(&cv_usejoystick2);
|
CV_RegisterVar(&cv_usejoystick2);
|
||||||
|
|
|
@ -24,20 +24,21 @@
|
||||||
// Button/action code definitions.
|
// Button/action code definitions.
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
// First 4 bits are weapon change info, DO NOT USE!
|
BT_ACCELERATE = 1, // Accelerate
|
||||||
BT_WEAPONMASK = 0x0F, //our first four bits.
|
BT_DRIFT = 1<<2, // Drift (direction is cmd->angleturn)
|
||||||
|
BT_BRAKE = 1<<3, // Brake
|
||||||
|
BT_ATTACK = 1<<4, // Use Item
|
||||||
|
BT_FORWARD = 1<<5, // Aim Item Forward
|
||||||
|
BT_BACKWARD = 1<<6, // Aim Item Backward
|
||||||
|
BT_SPECTATE = 1<<7, // Toggle Spectate
|
||||||
|
|
||||||
BT_DRIFTLEFT = 1<<4, // Drift Left // BT_WEAPONNEXT
|
// Want more button space? Help get rid of this hack :V
|
||||||
BT_DRIFTRIGHT = 1<<5, // Drift Right // BT_WEAPONPREV
|
BT_DRIFTLEFT = 1<<8, // Drift left hack
|
||||||
|
BT_DRIFTRIGHT = 1<<9, // Drift right hack
|
||||||
|
|
||||||
BT_ATTACK = 1<<6, // use kart item // SRB2kart
|
// free: 1<<10 to 1<<12
|
||||||
BT_BRAKE = 1<<7, // brake // BT_USE
|
|
||||||
BT_FORWARD = 1<<8, // toss item forward // BT_CAMLEFT
|
|
||||||
BT_BACKWARD = 1<<9, // drop item behind // BT_CAMRIGHT
|
|
||||||
BT_SPECTATE = 1<<10, // toggle spectate // BT_TOSSFLAG
|
|
||||||
BT_JUMP = 1<<11,
|
|
||||||
BT_ACCELERATE = 1<<12, // Accelerate // BT_FIRENORMAL
|
|
||||||
|
|
||||||
|
// Lua garbage
|
||||||
BT_CUSTOM1 = 1<<13,
|
BT_CUSTOM1 = 1<<13,
|
||||||
BT_CUSTOM2 = 1<<14,
|
BT_CUSTOM2 = 1<<14,
|
||||||
BT_CUSTOM3 = 1<<15,
|
BT_CUSTOM3 = 1<<15,
|
||||||
|
|
|
@ -7815,16 +7815,15 @@ struct {
|
||||||
{"NUMDIRS",NUMDIRS},
|
{"NUMDIRS",NUMDIRS},
|
||||||
|
|
||||||
// Buttons (ticcmd_t) // SRB2kart
|
// Buttons (ticcmd_t) // SRB2kart
|
||||||
{"BT_WEAPONMASK",BT_WEAPONMASK}, //our first four bits.
|
{"BT_ACCELERATE",BT_ACCELERATE},
|
||||||
|
{"BT_DRIFT",BT_DRIFT},
|
||||||
|
{"BT_BRAKE",BT_BRAKE},
|
||||||
|
{"BT_ATTACK",BT_ATTACK},
|
||||||
|
{"BT_FORWARD",BT_FORWARD},
|
||||||
|
{"BT_BACKWARD",BT_BACKWARD},
|
||||||
|
{"BT_SPECTATE",BT_SPECTATE},
|
||||||
{"BT_DRIFTLEFT",BT_DRIFTLEFT},
|
{"BT_DRIFTLEFT",BT_DRIFTLEFT},
|
||||||
{"BT_DRIFTRIGHT",BT_DRIFTRIGHT},
|
{"BT_DRIFTRIGHT",BT_DRIFTRIGHT},
|
||||||
{"BT_ATTACK",BT_ATTACK}, // shoot rings
|
|
||||||
{"BT_BRAKE",BT_BRAKE}, // brake
|
|
||||||
{"BT_FORWARD",BT_FORWARD}, // turn camera left
|
|
||||||
{"BT_BACKWARD",BT_BACKWARD}, // turn camera right
|
|
||||||
{"BT_SPECTATE",BT_SPECTATE},
|
|
||||||
{"BT_JUMP",BT_JUMP},
|
|
||||||
{"BT_ACCELERATE",BT_ACCELERATE}, // Fire a normal ring no matter what
|
|
||||||
{"BT_CUSTOM1",BT_CUSTOM1}, // Lua customizable
|
{"BT_CUSTOM1",BT_CUSTOM1}, // Lua customizable
|
||||||
{"BT_CUSTOM2",BT_CUSTOM2}, // Lua customizable
|
{"BT_CUSTOM2",BT_CUSTOM2}, // Lua customizable
|
||||||
{"BT_CUSTOM3",BT_CUSTOM3}, // Lua customizable
|
{"BT_CUSTOM3",BT_CUSTOM3}, // Lua customizable
|
||||||
|
|
241
src/g_game.c
241
src/g_game.c
|
@ -385,11 +385,11 @@ consvar_t cv_crosshair2 = {"crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NUL
|
||||||
consvar_t cv_crosshair3 = {"crosshair3", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_crosshair3 = {"crosshair3", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_crosshair4 = {"crosshair4", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_crosshair4 = {"crosshair4", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_invertmouse = {"invertmouse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_invertmouse = {"invertmouse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_alwaysfreelook = {"alwaysmlook", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_alwaysfreelook = {"alwaysmlook", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_invertmouse2 = {"invertmouse2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_invertmouse2 = {"invertmouse2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_alwaysfreelook2 = {"alwaysmlook2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_alwaysfreelook2 = {"alwaysmlook2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_mousemove = {"mousemove", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_mousemove = {"mousemove", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_mousemove2 = {"mousemove2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_mousemove2 = {"mousemove2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_analog = {"analog", "Off", CV_CALL, CV_OnOff, Analog_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_analog = {"analog", "Off", CV_CALL, CV_OnOff, Analog_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_analog2 = {"analog2", "Off", CV_CALL, CV_OnOff, Analog2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_analog2 = {"analog2", "Off", CV_CALL, CV_OnOff, Analog2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_analog3 = {"analog3", "Off", CV_CALL, CV_OnOff, Analog3_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_analog3 = {"analog3", "Off", CV_CALL, CV_OnOff, Analog3_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
@ -1181,16 +1181,16 @@ INT32 localaiming, localaiming2, localaiming3, localaiming4;
|
||||||
angle_t localangle, localangle2, localangle3, localangle4;
|
angle_t localangle, localangle2, localangle3, localangle4;
|
||||||
|
|
||||||
static fixed_t forwardmove[2] = {25<<FRACBITS>>16, 50<<FRACBITS>>16};
|
static fixed_t forwardmove[2] = {25<<FRACBITS>>16, 50<<FRACBITS>>16};
|
||||||
static fixed_t sidemove[2] = {25<<FRACBITS>>16, 50<<FRACBITS>>16}; // faster!
|
//static fixed_t sidemove[2] = {25<<FRACBITS>>16, 50<<FRACBITS>>16}; // faster!
|
||||||
static fixed_t angleturn[3] = {400, 800, 200}; // + slow turn
|
static fixed_t angleturn[3] = {400, 800, 200}; // + slow turn
|
||||||
|
|
||||||
void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
{
|
{
|
||||||
boolean forcestrafe = false;
|
boolean forcestrafe = false;
|
||||||
INT32 laim, th, tspeed, forward, side, axis, i;
|
INT32 laim, th, tspeed, forward, side, axis; //i
|
||||||
const INT32 speed = 1;
|
const INT32 speed = 1;
|
||||||
// these ones used for multiple conditions
|
// these ones used for multiple conditions
|
||||||
boolean turnleft, turnright, invertmouse, mouseaiming, lookaxis, analog, analogjoystickmove, gamepadjoystickmove, kbl;
|
boolean turnleft, turnright, invertmouse, mouseaiming, lookaxis, analogjoystickmove, gamepadjoystickmove, kbl; //analog
|
||||||
player_t *player;
|
player_t *player;
|
||||||
camera_t *thiscam;
|
camera_t *thiscam;
|
||||||
angle_t lang;
|
angle_t lang;
|
||||||
|
@ -1250,12 +1250,12 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
|
|
||||||
if (ssplayer == 2)
|
if (ssplayer == 2)
|
||||||
{
|
{
|
||||||
mouseaiming = (PLAYER2INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook2.value;
|
mouseaiming = player->spectator; //mouseaiming = (PLAYER2INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook2.value;
|
||||||
invertmouse = cv_invertmouse2.value;
|
invertmouse = cv_invertmouse2.value;
|
||||||
lookaxis = cv_lookaxis2.value;
|
lookaxis = cv_lookaxis2.value;
|
||||||
analogjoystickmove = cv_usejoystick2.value && !Joystick2.bGamepadStyle;
|
analogjoystickmove = cv_usejoystick2.value && !Joystick2.bGamepadStyle;
|
||||||
gamepadjoystickmove = cv_usejoystick2.value && Joystick2.bGamepadStyle;
|
gamepadjoystickmove = cv_usejoystick2.value && Joystick2.bGamepadStyle;
|
||||||
analog = cv_analog2.value;
|
//analog = cv_analog2.value;
|
||||||
}
|
}
|
||||||
else if (ssplayer == 3)
|
else if (ssplayer == 3)
|
||||||
{
|
{
|
||||||
|
@ -1264,7 +1264,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
lookaxis = cv_lookaxis3.value;
|
lookaxis = cv_lookaxis3.value;
|
||||||
analogjoystickmove = cv_usejoystick3.value && !Joystick3.bGamepadStyle;
|
analogjoystickmove = cv_usejoystick3.value && !Joystick3.bGamepadStyle;
|
||||||
gamepadjoystickmove = cv_usejoystick3.value && Joystick3.bGamepadStyle;
|
gamepadjoystickmove = cv_usejoystick3.value && Joystick3.bGamepadStyle;
|
||||||
analog = cv_analog3.value;
|
//analog = cv_analog3.value;
|
||||||
}
|
}
|
||||||
else if (ssplayer == 4)
|
else if (ssplayer == 4)
|
||||||
{
|
{
|
||||||
|
@ -1273,16 +1273,16 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
lookaxis = cv_lookaxis4.value;
|
lookaxis = cv_lookaxis4.value;
|
||||||
analogjoystickmove = cv_usejoystick4.value && !Joystick4.bGamepadStyle;
|
analogjoystickmove = cv_usejoystick4.value && !Joystick4.bGamepadStyle;
|
||||||
gamepadjoystickmove = cv_usejoystick4.value && Joystick4.bGamepadStyle;
|
gamepadjoystickmove = cv_usejoystick4.value && Joystick4.bGamepadStyle;
|
||||||
analog = cv_analog4.value;
|
//analog = cv_analog4.value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mouseaiming = (PLAYER1INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook.value;
|
mouseaiming = player->spectator; //mouseaiming = (PLAYER1INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook.value;
|
||||||
invertmouse = cv_invertmouse.value;
|
invertmouse = cv_invertmouse.value;
|
||||||
lookaxis = cv_lookaxis.value;
|
lookaxis = cv_lookaxis.value;
|
||||||
analogjoystickmove = cv_usejoystick.value && !Joystick.bGamepadStyle;
|
analogjoystickmove = cv_usejoystick.value && !Joystick.bGamepadStyle;
|
||||||
gamepadjoystickmove = cv_usejoystick.value && Joystick.bGamepadStyle;
|
gamepadjoystickmove = cv_usejoystick.value && Joystick.bGamepadStyle;
|
||||||
analog = cv_analog.value;
|
//analog = cv_analog.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
turnright = InputDown(gc_turnright, ssplayer);
|
turnright = InputDown(gc_turnright, ssplayer);
|
||||||
|
@ -1318,37 +1318,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
tspeed = speed;
|
tspeed = speed;
|
||||||
|
|
||||||
// let movement keys cancel each other out
|
// let movement keys cancel each other out
|
||||||
if (analog) // Analog
|
|
||||||
{
|
|
||||||
if (turnright)
|
|
||||||
cmd->angleturn = (INT16)(cmd->angleturn - angleturn[tspeed]);
|
|
||||||
if (turnleft)
|
|
||||||
cmd->angleturn = (INT16)(cmd->angleturn + angleturn[tspeed]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (analog || twodlevel
|
|
||||||
|| (player->mo && (player->mo->flags2 & MF2_TWOD))
|
|
||||||
|| (!demoplayback && (player->climbing
|
|
||||||
|| (player->pflags & PF_NIGHTSMODE)
|
|
||||||
|| (player->pflags & PF_SLIDING)
|
|
||||||
|| (player->pflags & PF_FORCESTRAFE)))) // Analog
|
|
||||||
forcestrafe = true;
|
|
||||||
|
|
||||||
if (forcestrafe) // Analog
|
|
||||||
{
|
|
||||||
if (turnright)
|
|
||||||
side += sidemove[speed];
|
|
||||||
if (turnleft)
|
|
||||||
side -= sidemove[speed];
|
|
||||||
|
|
||||||
if (analogjoystickmove && axis != 0)
|
|
||||||
{
|
|
||||||
// JOYAXISRANGE is supposed to be 1023 (divide by 1024)
|
|
||||||
side += ((axis * sidemove[1]) >> 10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (turnright && !(turnleft))
|
if (turnright && !(turnleft))
|
||||||
cmd->angleturn = (INT16)(cmd->angleturn - angleturn[tspeed]);
|
cmd->angleturn = (INT16)(cmd->angleturn - angleturn[tspeed]);
|
||||||
else if (turnleft && !(turnright))
|
else if (turnleft && !(turnright))
|
||||||
|
@ -1359,23 +1328,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
// JOYAXISRANGE should be 1023 (divide by 1024)
|
// JOYAXISRANGE should be 1023 (divide by 1024)
|
||||||
cmd->angleturn = (INT16)(cmd->angleturn - ((axis * angleturn[1]) >> 10)); // ANALOG!
|
cmd->angleturn = (INT16)(cmd->angleturn - ((axis * angleturn[1]) >> 10)); // ANALOG!
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
axis = JoyAxis(AXISSTRAFE, ssplayer);
|
|
||||||
if (gamepadjoystickmove && axis != 0)
|
|
||||||
{
|
|
||||||
if (axis < 0)
|
|
||||||
side += sidemove[speed];
|
|
||||||
else if (axis > 0)
|
|
||||||
side -= sidemove[speed];
|
|
||||||
}
|
|
||||||
else if (analogjoystickmove && axis != 0)
|
|
||||||
{
|
|
||||||
// JOYAXISRANGE is supposed to be 1023 (divide by 1024)
|
|
||||||
side += ((axis * sidemove[1]) >> 10);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// forward with key or button // SRB2kart - we use an accel/brake instead of forward/backward.
|
// forward with key or button // SRB2kart - we use an accel/brake instead of forward/backward.
|
||||||
if (InputDown(gc_accelerate, ssplayer) || player->kartstuff[k_mushroomtimer])
|
if (InputDown(gc_accelerate, ssplayer) || player->kartstuff[k_mushroomtimer])
|
||||||
|
@ -1383,68 +1335,29 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
cmd->buttons |= BT_ACCELERATE;
|
cmd->buttons |= BT_ACCELERATE;
|
||||||
forward = forwardmove[1]; // 50
|
forward = forwardmove[1]; // 50
|
||||||
}
|
}
|
||||||
|
|
||||||
if (InputDown(gc_brake, ssplayer))
|
if (InputDown(gc_brake, ssplayer))
|
||||||
{
|
{
|
||||||
cmd->buttons |= BT_BRAKE;
|
cmd->buttons |= BT_BRAKE;
|
||||||
forward -= forwardmove[0]; // 25 - Halved value so clutching is possible
|
forward -= forwardmove[0]; // 25 - Halved value so clutching is possible
|
||||||
}
|
}
|
||||||
// But forward/backward IS used for aiming.
|
|
||||||
|
// drift button
|
||||||
|
if (InputDown(gc_drift, ssplayer))
|
||||||
|
cmd->buttons |= BT_DRIFT;
|
||||||
|
|
||||||
|
// forward/backward is used for aiming
|
||||||
axis = JoyAxis(AXISMOVE, ssplayer);
|
axis = JoyAxis(AXISMOVE, ssplayer);
|
||||||
if (InputDown(gc_aimforward, ssplayer) || (gamepadjoystickmove && axis < 0) || (analogjoystickmove && axis < 0))
|
if (InputDown(gc_aimforward, ssplayer) || (gamepadjoystickmove && axis < 0) || (analogjoystickmove && axis < 0))
|
||||||
cmd->buttons |= BT_FORWARD;
|
cmd->buttons |= BT_FORWARD;
|
||||||
if (InputDown(gc_aimbackward, ssplayer) || (gamepadjoystickmove && axis > 0) || (analogjoystickmove && axis > 0))
|
if (InputDown(gc_aimbackward, ssplayer) || (gamepadjoystickmove && axis > 0) || (analogjoystickmove && axis > 0))
|
||||||
cmd->buttons |= BT_BACKWARD;
|
cmd->buttons |= BT_BACKWARD;
|
||||||
/*
|
|
||||||
if (InputDown(gc_forward, ssplayer) || (gamepadjoystickmove && axis < 0))
|
|
||||||
forward = forwardmove[speed];
|
|
||||||
if (InputDown(gc_backward, ssplayer) || (gamepadjoystickmove && axis > 0))
|
|
||||||
forward -= forwardmove[speed];
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (analogjoystickmove && axis != 0)
|
|
||||||
forward -= ((axis * forwardmove[1]) >> 10); // ANALOG!
|
|
||||||
*/
|
|
||||||
|
|
||||||
// some people strafe left & right with mouse buttons
|
|
||||||
// those people are weird
|
|
||||||
|
|
||||||
/* // SRB2kart - these aren't used in kart
|
|
||||||
if (InputDown(gc_straferight, ssplayer))
|
|
||||||
side += sidemove[speed];
|
|
||||||
if (InputDown(gc_strafeleft, ssplayer))
|
|
||||||
side -= sidemove[speed];
|
|
||||||
|
|
||||||
if (InputDown(gc_driftleft, ssplayer))
|
|
||||||
cmd->buttons |= BT_WEAPONNEXT; // Next Weapon
|
|
||||||
if (InputDown(gc_driftright, ssplayer))
|
|
||||||
cmd->buttons |= BT_WEAPONPREV; // Previous Weapon
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if NUM_WEAPONS > 10
|
|
||||||
"Add extra inputs to g_input.h/gamecontrols_e"
|
|
||||||
#endif
|
|
||||||
//use the four avaliable bits to determine the weapon.
|
|
||||||
cmd->buttons &= ~BT_WEAPONMASK;
|
|
||||||
for (i = 0; i < NUM_WEAPONS; ++i)
|
|
||||||
if (InputDown(gc_wepslot1 + i, ssplayer))
|
|
||||||
{
|
|
||||||
cmd->buttons |= (UINT16)(i + 1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// fire with any button/key
|
// fire with any button/key
|
||||||
axis = JoyAxis(AXISFIRE, ssplayer);
|
axis = JoyAxis(AXISFIRE, ssplayer);
|
||||||
if (InputDown(gc_fire, ssplayer) || (cv_usejoystick.value && axis > 0))
|
if (InputDown(gc_fire, ssplayer) || (cv_usejoystick.value && axis > 0))
|
||||||
cmd->buttons |= BT_ATTACK;
|
cmd->buttons |= BT_ATTACK;
|
||||||
|
|
||||||
// fire normal with any button/key
|
|
||||||
/*
|
|
||||||
axis = JoyAxis(ssplayer, AXISFIRENORMAL);
|
|
||||||
if (InputDown(gc_accelerate, ssplayer) || (cv_usejoystick.value && axis > 0))
|
|
||||||
cmd->buttons |= BT_ACCELERATE;
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (InputDown(gc_spectate, ssplayer))
|
if (InputDown(gc_spectate, ssplayer))
|
||||||
cmd->buttons |= BT_SPECTATE;
|
cmd->buttons |= BT_SPECTATE;
|
||||||
|
|
||||||
|
@ -1456,37 +1369,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
if (InputDown(gc_custom3, ssplayer))
|
if (InputDown(gc_custom3, ssplayer))
|
||||||
cmd->buttons |= BT_CUSTOM3;
|
cmd->buttons |= BT_CUSTOM3;
|
||||||
|
|
||||||
// use with any button/key
|
|
||||||
/*
|
|
||||||
if (InputDown(gc_brake, ssplayer))
|
|
||||||
cmd->buttons |= BT_BRAKE;
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Camera Controls
|
|
||||||
/*
|
|
||||||
if (cv_debug || cv_analog.value || demoplayback || objectplacing || player->pflags & PF_NIGHTSMODE)
|
|
||||||
{
|
|
||||||
if (InputDown(gc_aimforward, ssplayer))
|
|
||||||
cmd->buttons |= BT_FORWARD;
|
|
||||||
if (InputDown(gc_aimbackward, ssplayer))
|
|
||||||
cmd->buttons |= BT_BACKWARD;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (InputDown(gc_lookback, ssplayer))
|
|
||||||
{
|
|
||||||
if (thiscam->chase && !player->kartstuff[k_camspin])
|
|
||||||
player->kartstuff[k_camspin] = 1;
|
|
||||||
}
|
|
||||||
else if (player->kartstuff[k_camspin] > 0)
|
|
||||||
player->kartstuff[k_camspin] = -1;
|
|
||||||
*/
|
|
||||||
|
|
||||||
// jump button
|
|
||||||
if (InputDown(gc_jump, ssplayer))
|
|
||||||
cmd->buttons |= BT_JUMP;
|
|
||||||
|
|
||||||
// player aiming shit, ahhhh...
|
// player aiming shit, ahhhh...
|
||||||
{
|
{
|
||||||
INT32 player_invert = invertmouse ? -1 : 1;
|
INT32 player_invert = invertmouse ? -1 : 1;
|
||||||
|
@ -1532,18 +1414,41 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
cmd->aiming = G_ClipAimingPitch(&laim);
|
cmd->aiming = G_ClipAimingPitch(&laim);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mouseaiming && cv_mousemove.value)
|
|
||||||
forward += mousey;
|
|
||||||
|
|
||||||
if (analog ||
|
|
||||||
(!demoplayback && (player->climbing
|
|
||||||
|| (player->pflags & PF_SLIDING)))) // Analog for mouse
|
|
||||||
side += mousex*2;
|
|
||||||
else
|
|
||||||
cmd->angleturn = (INT16)(cmd->angleturn - (mousex*8));
|
cmd->angleturn = (INT16)(cmd->angleturn - (mousex*8));
|
||||||
|
|
||||||
mousex = mousey = mlooky = 0;
|
mousex = mousey = mlooky = 0;
|
||||||
|
|
||||||
|
//{ SRB2kart - Drift support
|
||||||
|
axis = JoyAxis(AXISTURN, ssplayer);
|
||||||
|
if (mirrormode)
|
||||||
|
axis = -axis;
|
||||||
|
|
||||||
|
// TODO: we really need to figure out a better way of doing this, two extra buttons used for this is stupid
|
||||||
|
if (cmd->angleturn > 0) // Drifting to the left
|
||||||
|
cmd->buttons |= BT_DRIFTLEFT;
|
||||||
|
else
|
||||||
|
cmd->buttons &= ~BT_DRIFTLEFT;
|
||||||
|
|
||||||
|
if (cmd->angleturn < 0) // Drifting to the right
|
||||||
|
cmd->buttons |= BT_DRIFTRIGHT;
|
||||||
|
else
|
||||||
|
cmd->buttons &= ~BT_DRIFTRIGHT;
|
||||||
|
//}
|
||||||
|
|
||||||
|
// limit turning to angleturn[1] to stop mouselook letting you look too fast
|
||||||
|
if (cmd->angleturn > angleturn[1])
|
||||||
|
cmd->angleturn = angleturn[1];
|
||||||
|
else if (cmd->angleturn < -angleturn[1])
|
||||||
|
cmd->angleturn = -angleturn[1];
|
||||||
|
|
||||||
|
if (player->mo)
|
||||||
|
cmd->angleturn = K_GetKartTurnValue(player, cmd->angleturn);
|
||||||
|
|
||||||
|
// SRB2kart - no additional angle if not moving
|
||||||
|
if ((player->mo && player->speed > 0) || (leveltime > 140 && (cmd->buttons & BT_ACCELERATE) && (cmd->buttons & BT_BRAKE)))
|
||||||
|
lang += (cmd->angleturn<<16);
|
||||||
|
|
||||||
|
cmd->angleturn = (INT16)(lang >> 16);
|
||||||
|
|
||||||
if (forward > MAXPLMOVE)
|
if (forward > MAXPLMOVE)
|
||||||
forward = MAXPLMOVE;
|
forward = MAXPLMOVE;
|
||||||
else if (forward < -MAXPLMOVE)
|
else if (forward < -MAXPLMOVE)
|
||||||
|
@ -1571,27 +1476,10 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
|
|
||||||
cmd->forwardmove = (SINT8)(cmd->forwardmove + forward);
|
cmd->forwardmove = (SINT8)(cmd->forwardmove + forward);
|
||||||
cmd->sidemove = (SINT8)(cmd->sidemove + side);
|
cmd->sidemove = (SINT8)(cmd->sidemove + side);
|
||||||
|
|
||||||
if (mirrormode)
|
if (mirrormode)
|
||||||
cmd->sidemove = -cmd->sidemove;
|
cmd->sidemove = -cmd->sidemove;
|
||||||
|
|
||||||
//{ SRB2kart - Drift support
|
/*if (ssplayer == 2 && player->bot == 1) {
|
||||||
axis = JoyAxis(AXISTURN, ssplayer);
|
|
||||||
if (mirrormode)
|
|
||||||
axis = -axis;
|
|
||||||
|
|
||||||
if (cmd->angleturn > 0) // Drifting to the left
|
|
||||||
cmd->buttons |= BT_DRIFTLEFT;
|
|
||||||
else
|
|
||||||
cmd->buttons &= ~BT_DRIFTLEFT;
|
|
||||||
|
|
||||||
if (cmd->angleturn < 0) // Drifting to the right
|
|
||||||
cmd->buttons |= BT_DRIFTRIGHT;
|
|
||||||
else
|
|
||||||
cmd->buttons &= ~BT_DRIFTRIGHT;
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (ssplayer == 2 && player->bot == 1) {
|
|
||||||
if (!player->powers[pw_tailsfly] && (cmd->forwardmove || cmd->sidemove || cmd->buttons))
|
if (!player->powers[pw_tailsfly] && (cmd->forwardmove || cmd->sidemove || cmd->buttons))
|
||||||
{
|
{
|
||||||
player->bot = 2; // A player-controlled bot. Returns to AI when it respawns.
|
player->bot = 2; // A player-controlled bot. Returns to AI when it respawns.
|
||||||
|
@ -1602,30 +1490,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
G_CopyTiccmd(cmd, I_BaseTiccmd2(), 1); // empty, or external driver
|
G_CopyTiccmd(cmd, I_BaseTiccmd2(), 1); // empty, or external driver
|
||||||
B_BuildTiccmd(player, cmd);
|
B_BuildTiccmd(player, cmd);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (analog) {
|
|
||||||
cmd->angleturn = (INT16)(thiscam->angle >> 16);
|
|
||||||
if (player->awayviewtics)
|
|
||||||
cmd->angleturn = (INT16)(player->awayviewmobj->angle >> 16);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// limit turning to angleturn[1] to stop mouselook letting you look too fast
|
|
||||||
if (cmd->angleturn > angleturn[1])
|
|
||||||
cmd->angleturn = angleturn[1];
|
|
||||||
else if (cmd->angleturn < -angleturn[1])
|
|
||||||
cmd->angleturn = -angleturn[1];
|
|
||||||
|
|
||||||
if (player->mo)
|
|
||||||
cmd->angleturn = K_GetKartTurnValue(player, cmd->angleturn);
|
|
||||||
|
|
||||||
// SRB2kart - no additional angle if not moving
|
|
||||||
if ((player->mo && player->speed > 0) || (leveltime > 140 && (cmd->buttons & BT_ACCELERATE) && (cmd->buttons & BT_BRAKE)))
|
|
||||||
lang += (cmd->angleturn<<16);
|
|
||||||
|
|
||||||
cmd->angleturn = (INT16)(lang >> 16);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ssplayer == 2)
|
if (ssplayer == 2)
|
||||||
{
|
{
|
||||||
|
|
266
src/g_input.c
266
src/g_input.c
|
@ -1188,40 +1188,23 @@ static keyname_t keynames[] =
|
||||||
static const char *gamecontrolname[num_gamecontrols] =
|
static const char *gamecontrolname[num_gamecontrols] =
|
||||||
{
|
{
|
||||||
"nothing", // a key/button mapped to gc_null has no effect
|
"nothing", // a key/button mapped to gc_null has no effect
|
||||||
"forward",
|
|
||||||
"backward",
|
|
||||||
"strafeleft",
|
|
||||||
"straferight",
|
|
||||||
"turnleft",
|
|
||||||
"turnright",
|
|
||||||
"driftleft",
|
|
||||||
"driftright",
|
|
||||||
"weapon1",
|
|
||||||
"weapon2",
|
|
||||||
"weapon3",
|
|
||||||
"weapon4",
|
|
||||||
"weapon5",
|
|
||||||
"weapon6",
|
|
||||||
"weapon7",
|
|
||||||
"weapon8",
|
|
||||||
"weapon9",
|
|
||||||
"weapon10",
|
|
||||||
"fire",
|
|
||||||
"accelerate",
|
|
||||||
"spectate",
|
|
||||||
"brake",
|
|
||||||
"camtoggle",
|
|
||||||
"aimforward",
|
"aimforward",
|
||||||
"aimbackward",
|
"aimbackward",
|
||||||
|
"turnleft",
|
||||||
|
"turnright",
|
||||||
|
"accelerate",
|
||||||
|
"drift",
|
||||||
|
"brake",
|
||||||
|
"fire",
|
||||||
"lookback",
|
"lookback",
|
||||||
|
"camtoggle",
|
||||||
|
"spectate",
|
||||||
"lookup",
|
"lookup",
|
||||||
"lookdown",
|
"lookdown",
|
||||||
"centerview",
|
"centerview",
|
||||||
"mouseaiming",
|
|
||||||
"talkkey",
|
"talkkey",
|
||||||
"teamtalkkey",
|
"teamtalkkey",
|
||||||
"scores",
|
"scores",
|
||||||
"jump",
|
|
||||||
"console",
|
"console",
|
||||||
"pause",
|
"pause",
|
||||||
"custom1",
|
"custom1",
|
||||||
|
@ -1285,222 +1268,35 @@ INT32 G_KeyStringtoNum(const char *keystr)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DC
|
// SRB2Kart
|
||||||
void G_Controldefault(void)
|
void G_Controldefault(void)
|
||||||
{
|
{
|
||||||
gamecontrol[gc_forward ][0] = KEY_HAT1+0; //Up
|
// Main controls
|
||||||
gamecontrol[gc_forward ][1] = KEY_UPARROW;
|
gamecontrol[gc_aimforward ][0] = KEY_UPARROW;
|
||||||
gamecontrol[gc_backward ][0] = KEY_HAT1+1; //Down
|
gamecontrol[gc_aimbackward][0] = KEY_DOWNARROW;
|
||||||
gamecontrol[gc_backward ][1] = KEY_DOWNARROW;
|
|
||||||
//gamecontrol[gc_straferight][0] = '[';
|
|
||||||
//gamecontrol[gc_strafeleft ][0] = ']';
|
|
||||||
gamecontrol[gc_turnleft ][0] = KEY_HAT1+2; //Left
|
|
||||||
gamecontrol[gc_turnleft ][1] = KEY_LEFTARROW;
|
|
||||||
gamecontrol[gc_turnright ][0] = KEY_HAT1+3; //Right
|
|
||||||
gamecontrol[gc_turnright ][1] = KEY_RIGHTARROW;
|
|
||||||
gamecontrol[gc_driftleft ][0] = ']';
|
|
||||||
gamecontrol[gc_driftright ][0] = '[';
|
|
||||||
gamecontrol[gc_fire ][0] = KEY_JOY1+6; //X
|
|
||||||
gamecontrol[gc_fire ][1] = KEY_RCTRL;
|
|
||||||
gamecontrol[gc_accelerate ][0] = KEY_JOY1+5; //Y
|
|
||||||
gamecontrol[gc_accelerate ][1] = ';';
|
|
||||||
gamecontrol[gc_spectate ][0] = '\'';
|
|
||||||
gamecontrol[gc_brake ][0] = KEY_JOY1+1; //B
|
|
||||||
gamecontrol[gc_brake ][1] = '.';
|
|
||||||
gamecontrol[gc_camtoggle ][1] = ',';
|
|
||||||
gamecontrol[gc_aimforward ][0] = 'o';
|
|
||||||
gamecontrol[gc_aimbackward][0] = 'p';
|
|
||||||
gamecontrol[gc_lookback ][0] = 'c';
|
|
||||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
|
||||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
|
||||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
|
||||||
gamecontrol[gc_mouseaiming][0] = 's';
|
|
||||||
gamecontrol[gc_talkkey ][0] = 't';
|
|
||||||
gamecontrol[gc_teamkey ][0] = 'y';
|
|
||||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
|
||||||
gamecontrol[gc_jump ][0] = KEY_JOY1+2; //A
|
|
||||||
gamecontrol[gc_jump ][1] = '/';
|
|
||||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
|
||||||
gamecontrol[gc_console ][1] = KEY_F5;
|
|
||||||
//gamecontrolbis
|
|
||||||
gamecontrolbis[gc_forward ][0] = KEY_2HAT1+0;
|
|
||||||
gamecontrolbis[gc_forward ][1] = 'w';
|
|
||||||
gamecontrolbis[gc_backward ][0] = KEY_2HAT1+1;
|
|
||||||
gamecontrolbis[gc_backward ][1] = 's';
|
|
||||||
gamecontrolbis[gc_turnleft ][0] = KEY_2HAT1+2;
|
|
||||||
gamecontrolbis[gc_turnleft ][1] = 'a';
|
|
||||||
gamecontrolbis[gc_turnright ][0] = KEY_2HAT1+3;
|
|
||||||
gamecontrolbis[gc_turnright ][1] = 'd';
|
|
||||||
gamecontrolbis[gc_driftleft ][0] = 't';
|
|
||||||
gamecontrolbis[gc_driftright][0] = 'r';
|
|
||||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+6; //X
|
|
||||||
gamecontrolbis[gc_accelerate][0] = KEY_2JOY1+5; //Y
|
|
||||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+1; //B
|
|
||||||
gamecontrolbis[gc_jump ][0] = KEY_2JOY1+2; //A
|
|
||||||
//gamecontrolbis[gc_straferight][0] = 'x';
|
|
||||||
//gamecontrolbis[gc_strafeleft ][0] = 'z';
|
|
||||||
}
|
|
||||||
#elif defined (_PSP)
|
|
||||||
void G_Controldefault(void)
|
|
||||||
{
|
|
||||||
gamecontrol[gc_forward ][0] = KEY_HAT1+0; // Up
|
|
||||||
gamecontrol[gc_backward ][0] = KEY_HAT1+1; // Down
|
|
||||||
gamecontrol[gc_turnleft ][0] = KEY_HAT1+2; // Left
|
|
||||||
gamecontrol[gc_turnright ][0] = KEY_HAT1+3; // Right
|
|
||||||
gamecontrol[gc_strafeleft ][0] = KEY_JOY1+4; // L
|
|
||||||
gamecontrol[gc_straferight][0] = KEY_JOY1+5; // R
|
|
||||||
gamecontrol[gc_spectate ][0] = KEY_JOY1+0; // Triangle
|
|
||||||
gamecontrol[gc_brake ][0] = KEY_JOY1+1; // Circle
|
|
||||||
gamecontrol[gc_camtoggle ][0] = KEY_JOY1+6; // Select
|
|
||||||
gamecontrol[gc_lookback ][0] = KEY_JOY1+3; // Square
|
|
||||||
gamecontrol[gc_centerview ][0] = KEY_JOY1+9; // Hold
|
|
||||||
gamecontrol[gc_pause ][0] = KEY_JOY1+8; // Start
|
|
||||||
gamecontrol[gc_jump ][0] = KEY_JOY1+2; // Cross
|
|
||||||
}
|
|
||||||
#elif defined (GP2X)
|
|
||||||
void G_Controldefault(void)
|
|
||||||
{
|
|
||||||
gamecontrol[gc_fire ][0] = KEY_JOY1+0; //A
|
|
||||||
gamecontrol[gc_forward ][0] = KEY_JOY1+1; //Y
|
|
||||||
gamecontrol[gc_jump ][0] = KEY_JOY1+2; //B
|
|
||||||
gamecontrol[gc_brake ][0] = KEY_JOY1+3; //X
|
|
||||||
gamecontrol[gc_strafeleft ][0] = KEY_JOY1+4; //L
|
|
||||||
gamecontrol[gc_straferight][0] = KEY_JOY1+5; //R
|
|
||||||
gamecontrol[gc_lookup ][0] = KEY_JOY1+6; //U
|
|
||||||
gamecontrol[gc_lookdown ][0] = KEY_JOY1+7; //D
|
|
||||||
gamecontrol[gc_pause ][0] = KEY_JOY1+8; //S
|
|
||||||
}
|
|
||||||
#elif defined (_NDS)
|
|
||||||
void G_Controldefault(void)
|
|
||||||
{
|
|
||||||
gamecontrol[gc_fire ][0] = KEY_JOY1+2; //X
|
|
||||||
gamecontrol[gc_forward ][0] = KEY_UPARROW;
|
|
||||||
gamecontrol[gc_backward ][0] = KEY_DOWNARROW;
|
|
||||||
gamecontrol[gc_jump ][0] = KEY_JOY1+0; //A
|
|
||||||
gamecontrol[gc_brake ][0] = KEY_JOY1+3; //Y
|
|
||||||
gamecontrol[gc_strafeleft ][0] = KEY_JOY1+4; //L
|
|
||||||
gamecontrol[gc_straferight][0] = KEY_JOY1+5; //R
|
|
||||||
gamecontrol[gc_turnleft ][0] = KEY_LEFTARROW;
|
gamecontrol[gc_turnleft ][0] = KEY_LEFTARROW;
|
||||||
gamecontrol[gc_turnright ][0] = KEY_RIGHTARROW;
|
gamecontrol[gc_turnright ][0] = KEY_RIGHTARROW;
|
||||||
gamecontrol[gc_pause ][0] = KEY_JOY1+6; //Start
|
gamecontrol[gc_accelerate ][0] = 'a';
|
||||||
gamecontrol[gc_driftleft ][0] = KEY_JOY1+7; //Select
|
gamecontrol[gc_drift ][0] = 's';
|
||||||
}
|
gamecontrol[gc_brake ][0] = 'd';
|
||||||
#else
|
gamecontrol[gc_fire ][0] = KEY_SPACE;
|
||||||
void G_Controldefault(void)
|
gamecontrol[gc_lookback ][0] = KEY_LSHIFT;
|
||||||
{
|
|
||||||
gamecontrol[gc_forward ][0] = KEY_UPARROW;
|
// Extra controls
|
||||||
gamecontrol[gc_forward ][1] = 'w';
|
gamecontrol[gc_camtoggle ][0] = KEY_BACKSPACE;
|
||||||
gamecontrol[gc_backward ][0] = KEY_DOWNARROW;
|
|
||||||
gamecontrol[gc_backward ][1] = 's';
|
|
||||||
gamecontrol[gc_strafeleft ][0] = 'a';
|
|
||||||
gamecontrol[gc_straferight][0] = 'd';
|
|
||||||
gamecontrol[gc_turnleft ][0] = KEY_LEFTARROW;
|
|
||||||
gamecontrol[gc_turnright ][0] = KEY_RIGHTARROW;
|
|
||||||
gamecontrol[gc_driftleft ][0] = 'e';
|
|
||||||
gamecontrol[gc_driftright ][0] = 'q';
|
|
||||||
gamecontrol[gc_wepslot1 ][0] = '1';
|
|
||||||
gamecontrol[gc_wepslot2 ][0] = '2';
|
|
||||||
gamecontrol[gc_wepslot3 ][0] = '3';
|
|
||||||
gamecontrol[gc_wepslot4 ][0] = '4';
|
|
||||||
gamecontrol[gc_wepslot5 ][0] = '5';
|
|
||||||
gamecontrol[gc_wepslot6 ][0] = '6';
|
|
||||||
gamecontrol[gc_wepslot7 ][0] = '7';
|
|
||||||
gamecontrol[gc_wepslot8 ][0] = '8';
|
|
||||||
gamecontrol[gc_wepslot9 ][0] = '9';
|
|
||||||
gamecontrol[gc_wepslot10 ][0] = '0';
|
|
||||||
gamecontrol[gc_fire ][0] = KEY_RCTRL;
|
|
||||||
gamecontrol[gc_fire ][1] = KEY_MOUSE1+0;
|
|
||||||
gamecontrol[gc_accelerate ][0] = 'c';
|
|
||||||
gamecontrol[gc_spectate ][0] = '\'';
|
|
||||||
gamecontrol[gc_brake ][0] = 'x';
|
|
||||||
gamecontrol[gc_camtoggle ][0] = 'v';
|
|
||||||
gamecontrol[gc_aimforward ][0] = '[';
|
|
||||||
gamecontrol[gc_aimbackward][0] = ']';
|
|
||||||
gamecontrol[gc_lookback ][0] = 'r';
|
|
||||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
|
||||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
|
||||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
|
||||||
gamecontrol[gc_talkkey ][0] = 't';
|
|
||||||
gamecontrol[gc_teamkey ][0] = 'y';
|
|
||||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
|
||||||
gamecontrol[gc_jump ][0] = 'z';
|
|
||||||
gamecontrol[gc_jump ][1] = KEY_MOUSE1+1;
|
|
||||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
|
||||||
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
||||||
#ifdef WMINPUT
|
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||||
gamecontrol[gc_forward ][0] = KEY_JOY1+02; //UP
|
gamecontrol[gc_talkkey ][0] = 't';
|
||||||
gamecontrol[gc_backward ][0] = KEY_JOY1+03; //DOWN
|
gamecontrol[gc_teamkey ][0] = 'y';
|
||||||
gamecontrol[gc_turnleft ][0] = KEY_JOY1+04; //LEFT
|
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||||
gamecontrol[gc_turnright ][0] = KEY_JOY1+05; //RIGHT
|
gamecontrol[gc_spectate ][0] = '\'';
|
||||||
gamecontrol[gc_driftleft ][0] = KEY_JOY1+10; //y
|
|
||||||
gamecontrol[gc_driftright ][0] = KEY_JOY1+9; //x
|
// Spectator controls
|
||||||
gamecontrol[gc_fire ][0] = KEY_JOY1+12; //L
|
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||||
gamecontrol[gc_accelerate ][0] = KEY_JOY1+13; //R
|
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||||
gamecontrol[gc_brake ][0] = KEY_JOY1+00; //B
|
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||||
gamecontrol[gc_brake ][1] = KEY_JOY1+07; //b
|
|
||||||
gamecontrol[gc_jump ][0] = KEY_JOY1+01; //A
|
|
||||||
gamecontrol[gc_jump ][1] = KEY_JOY1+06; //a
|
|
||||||
gamecontrol[gc_pause ][0] = KEY_JOY1+18; //Home
|
|
||||||
gamecontrolbis[gc_forward ][0] = KEY_2JOY1+02; //UP
|
|
||||||
gamecontrolbis[gc_backward ][0] = KEY_2JOY1+03; //DOWN
|
|
||||||
gamecontrolbis[gc_turnleft ][0] = KEY_2JOY1+04; //LEFT
|
|
||||||
gamecontrolbis[gc_turnright ][0] = KEY_2JOY1+05; //RIGHT
|
|
||||||
gamecontrolbis[gc_driftleft ][0] = KEY_2JOY1+10; //y
|
|
||||||
gamecontrolbis[gc_driftright ][0] = KEY_2JOY1+9; //x
|
|
||||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+12; //L
|
|
||||||
gamecontrolbis[gc_accelerate ][0] = KEY_2JOY1+13; //R
|
|
||||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+00; //B
|
|
||||||
gamecontrolbis[gc_brake ][1] = KEY_2JOY1+07; //b
|
|
||||||
gamecontrolbis[gc_jump ][0] = KEY_2JOY1+01; //A
|
|
||||||
gamecontrolbis[gc_jump ][1] = KEY_2JOY1+06; //a
|
|
||||||
gamecontrolbis[gc_pause ][0] = KEY_2JOY1+18; //Home
|
|
||||||
#endif
|
|
||||||
#ifdef _WII
|
|
||||||
gamecontrol[gc_forward ][1] = KEY_HAT1+00; //UP
|
|
||||||
gamecontrol[gc_backward ][1] = KEY_HAT1+01; //DOWN
|
|
||||||
gamecontrol[gc_straferight][1] = KEY_JOY1+16; //ZR
|
|
||||||
gamecontrol[gc_strafeleft ][1] = KEY_JOY1+15; //ZL
|
|
||||||
gamecontrol[gc_turnleft ][1] = KEY_HAT1+02; //LEFT
|
|
||||||
gamecontrol[gc_turnright ][1] = KEY_HAT1+03; //RIGHT
|
|
||||||
gamecontrol[gc_driftleft ][1] = KEY_JOY1+11; //x
|
|
||||||
gamecontrol[gc_fire ][0] = KEY_JOY1+12; //y
|
|
||||||
gamecontrol[gc_fire ][1] = KEY_JOY1+01; //B
|
|
||||||
gamecontrol[gc_accelerate ][0] = KEY_JOY1+13; //L
|
|
||||||
gamecontrol[gc_accelerate ][1] = KEY_JOY1+00; //A
|
|
||||||
gamecontrol[gc_spectate ][1] = KEY_JOY1+17; //Plus CC
|
|
||||||
gamecontrol[gc_brake ][0] = KEY_JOY1+9; //a
|
|
||||||
gamecontrol[gc_brake ][1] = KEY_JOY1+02; //1
|
|
||||||
gamecontrol[gc_centerview ][1] = KEY_JOY1+14; //R
|
|
||||||
gamecontrol[gc_scores ][0] = KEY_JOY1+04; //Minus
|
|
||||||
gamecontrol[gc_scores ][1] = KEY_JOY1+18; //Minus
|
|
||||||
gamecontrol[gc_jump ][0] = KEY_JOY1+10; //b
|
|
||||||
gamecontrol[gc_jump ][1] = KEY_JOY1+3; //2
|
|
||||||
gamecontrol[gc_pause ][0] = KEY_JOY1+06; //Home
|
|
||||||
gamecontrol[gc_pause ][1] = KEY_JOY1+19; //Home
|
|
||||||
gamecontrolbis[gc_forward ][1] = KEY_2HAT1+00; //UP
|
|
||||||
gamecontrolbis[gc_backward ][1] = KEY_2HAT1+01; //DOWN
|
|
||||||
gamecontrolbis[gc_straferight][1] = KEY_2JOY1+16; //ZR
|
|
||||||
gamecontrolbis[gc_strafeleft ][1] = KEY_2JOY1+15; //ZL
|
|
||||||
gamecontrolbis[gc_turnleft ][1] = KEY_2HAT1+02; //LEFT
|
|
||||||
gamecontrolbis[gc_turnright ][1] = KEY_2HAT1+03; //RIGHT
|
|
||||||
gamecontrolbis[gc_driftleft ][1] = KEY_2JOY1+11; //x
|
|
||||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+12; //y
|
|
||||||
gamecontrolbis[gc_fire ][1] = KEY_2JOY1+01; //B
|
|
||||||
gamecontrolbis[gc_accelerate ][0] = KEY_2JOY1+13; //L
|
|
||||||
gamecontrolbis[gc_accelerate ][1] = KEY_2JOY1+00; //A
|
|
||||||
gamecontrolbis[gc_spectate ][1] = KEY_2JOY1+17; //Plus CC
|
|
||||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+9; //a
|
|
||||||
gamecontrolbis[gc_brake ][1] = KEY_2JOY1+02; //1
|
|
||||||
gamecontrolbis[gc_centerview ][1] = KEY_2JOY1+14; //R
|
|
||||||
gamecontrolbis[gc_scores ][0] = KEY_2JOY1+04; //Minus
|
|
||||||
gamecontrolbis[gc_scores ][1] = KEY_2JOY1+18; //Minus
|
|
||||||
gamecontrolbis[gc_jump ][0] = KEY_2JOY1+10; //b
|
|
||||||
gamecontrolbis[gc_jump ][1] = KEY_2JOY1+3; //2
|
|
||||||
gamecontrolbis[gc_pause ][0] = KEY_2JOY1+06; //Home
|
|
||||||
gamecontrolbis[gc_pause ][1] = KEY_2JOY1+19; //Home
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
void G_SaveKeySetting(FILE *f)
|
void G_SaveKeySetting(FILE *f)
|
||||||
{
|
{
|
||||||
|
|
|
@ -94,40 +94,23 @@ typedef enum
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
gc_null = 0, // a key/button mapped to gc_null has no effect
|
gc_null = 0, // a key/button mapped to gc_null has no effect
|
||||||
gc_forward,
|
gc_aimforward,
|
||||||
gc_backward,
|
gc_aimbackward,
|
||||||
gc_strafeleft,
|
|
||||||
gc_straferight,
|
|
||||||
gc_turnleft,
|
gc_turnleft,
|
||||||
gc_turnright,
|
gc_turnright,
|
||||||
gc_driftleft, // gc_weaponnext
|
gc_accelerate,
|
||||||
gc_driftright, // gc_weaponprev
|
gc_drift,
|
||||||
gc_wepslot1,
|
gc_brake,
|
||||||
gc_wepslot2,
|
|
||||||
gc_wepslot3,
|
|
||||||
gc_wepslot4,
|
|
||||||
gc_wepslot5,
|
|
||||||
gc_wepslot6,
|
|
||||||
gc_wepslot7,
|
|
||||||
gc_wepslot8,
|
|
||||||
gc_wepslot9,
|
|
||||||
gc_wepslot10,
|
|
||||||
gc_fire,
|
gc_fire,
|
||||||
gc_accelerate, // gc_firenormal
|
gc_lookback,
|
||||||
gc_spectate, // gc_tossflag
|
|
||||||
gc_brake, // gc_use
|
|
||||||
gc_camtoggle,
|
gc_camtoggle,
|
||||||
gc_aimforward, // gc_camleft
|
gc_spectate,
|
||||||
gc_aimbackward, // gc_camright
|
|
||||||
gc_lookback, // gc_camreset
|
|
||||||
gc_lookup,
|
gc_lookup,
|
||||||
gc_lookdown,
|
gc_lookdown,
|
||||||
gc_centerview,
|
gc_centerview,
|
||||||
gc_mouseaiming, // mouse aiming is momentary (toggleable in the menu)
|
|
||||||
gc_talkkey,
|
gc_talkkey,
|
||||||
gc_teamkey,
|
gc_teamkey,
|
||||||
gc_scores,
|
gc_scores,
|
||||||
gc_jump,
|
|
||||||
gc_console,
|
gc_console,
|
||||||
gc_pause,
|
gc_pause,
|
||||||
gc_custom1, // Lua scriptable
|
gc_custom1, // Lua scriptable
|
||||||
|
|
|
@ -1575,7 +1575,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
&& player->kartstuff[k_feather] & 2)
|
&& player->kartstuff[k_feather] & 2)
|
||||||
player->kartstuff[k_feather] &= ~2;
|
player->kartstuff[k_feather] &= ~2;
|
||||||
|
|
||||||
if (cmd->buttons & BT_JUMP)
|
if (cmd->buttons & BT_DRIFT)
|
||||||
player->kartstuff[k_jmp] = 1;
|
player->kartstuff[k_jmp] = 1;
|
||||||
else
|
else
|
||||||
player->kartstuff[k_jmp] = 0;
|
player->kartstuff[k_jmp] = 0;
|
||||||
|
|
|
@ -1101,7 +1101,7 @@ void OP_ObjectplaceMovement(player_t *player)
|
||||||
if (!(cmd->angleturn & TICCMD_RECEIVED))
|
if (!(cmd->angleturn & TICCMD_RECEIVED))
|
||||||
ticmiss++;
|
ticmiss++;
|
||||||
|
|
||||||
if (cmd->buttons & BT_JUMP)
|
if (cmd->buttons & BT_DRIFT)
|
||||||
player->mo->z += FRACUNIT*cv_speed.value;
|
player->mo->z += FRACUNIT*cv_speed.value;
|
||||||
else if (cmd->buttons & BT_BRAKE)
|
else if (cmd->buttons & BT_BRAKE)
|
||||||
player->mo->z -= FRACUNIT*cv_speed.value;
|
player->mo->z -= FRACUNIT*cv_speed.value;
|
||||||
|
|
|
@ -1120,7 +1120,7 @@ static menuitem_t OP_MoveControlsMenu[] =
|
||||||
{IT_CALL | IT_STRING2, NULL, "Turn Left", M_ChangeControl, gc_turnleft },
|
{IT_CALL | IT_STRING2, NULL, "Turn Left", M_ChangeControl, gc_turnleft },
|
||||||
{IT_CALL | IT_STRING2, NULL, "Turn Right", M_ChangeControl, gc_turnright },
|
{IT_CALL | IT_STRING2, NULL, "Turn Right", M_ChangeControl, gc_turnright },
|
||||||
{IT_CALL | IT_STRING2, NULL, "Accelerate", M_ChangeControl, gc_accelerate },
|
{IT_CALL | IT_STRING2, NULL, "Accelerate", M_ChangeControl, gc_accelerate },
|
||||||
{IT_CALL | IT_STRING2, NULL, "Drift", M_ChangeControl, gc_jump },
|
{IT_CALL | IT_STRING2, NULL, "Drift", M_ChangeControl, gc_drift },
|
||||||
{IT_CALL | IT_STRING2, NULL, "Brake", M_ChangeControl, gc_brake },
|
{IT_CALL | IT_STRING2, NULL, "Brake", M_ChangeControl, gc_brake },
|
||||||
{IT_CALL | IT_STRING2, NULL, "Use/Throw Item", M_ChangeControl, gc_fire },
|
{IT_CALL | IT_STRING2, NULL, "Use/Throw Item", M_ChangeControl, gc_fire },
|
||||||
{IT_CALL | IT_STRING2, NULL, "Look Backward", M_ChangeControl, gc_lookback },
|
{IT_CALL | IT_STRING2, NULL, "Look Backward", M_ChangeControl, gc_lookback },
|
||||||
|
|
14
src/p_user.c
14
src/p_user.c
|
@ -4108,7 +4108,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd->buttons & BT_JUMP && !player->exiting && !P_PlayerInPain(player))
|
if (cmd->buttons & BT_DRIFT && !player->exiting && !P_PlayerInPain(player))
|
||||||
{
|
{
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUAh_JumpSpecial(player))
|
if (LUAh_JumpSpecial(player))
|
||||||
|
@ -4321,7 +4321,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd->buttons & BT_JUMP)
|
if (cmd->buttons & BT_DRIFT)
|
||||||
{
|
{
|
||||||
player->pflags |= PF_JUMPDOWN;
|
player->pflags |= PF_JUMPDOWN;
|
||||||
|
|
||||||
|
@ -5068,7 +5068,7 @@ static void P_SpectatorMovement(player_t *player)
|
||||||
if (player->mo->z < player->mo->floorz)
|
if (player->mo->z < player->mo->floorz)
|
||||||
player->mo->z = player->mo->floorz;
|
player->mo->z = player->mo->floorz;
|
||||||
|
|
||||||
if (cmd->buttons & BT_JUMP)
|
if (cmd->buttons & BT_DRIFT)
|
||||||
player->mo->z += FRACUNIT*16;
|
player->mo->z += FRACUNIT*16;
|
||||||
else if (cmd->buttons & BT_BRAKE)
|
else if (cmd->buttons & BT_BRAKE)
|
||||||
player->mo->z -= FRACUNIT*16;
|
player->mo->z -= FRACUNIT*16;
|
||||||
|
@ -5759,7 +5759,7 @@ static void P_NiGHTSMovement(player_t *player)
|
||||||
if (player->drilldelay)
|
if (player->drilldelay)
|
||||||
player->drilldelay--;
|
player->drilldelay--;
|
||||||
|
|
||||||
if (!(cmd->buttons & BT_JUMP))
|
if (!(cmd->buttons & BT_DRIFT))
|
||||||
{
|
{
|
||||||
// Always have just a TINY bit of drill power.
|
// Always have just a TINY bit of drill power.
|
||||||
if (player->drillmeter <= 0)
|
if (player->drillmeter <= 0)
|
||||||
|
@ -5996,7 +5996,7 @@ static void P_NiGHTSMovement(player_t *player)
|
||||||
player->pflags |= PF_DRILLING;
|
player->pflags |= PF_DRILLING;
|
||||||
newangle = (INT16)player->flyangle;
|
newangle = (INT16)player->flyangle;
|
||||||
}
|
}
|
||||||
else if (cmd->buttons & BT_JUMP && player->drillmeter && player->drilldelay == 0)
|
else if (cmd->buttons & BT_DRIFT && player->drillmeter && player->drilldelay == 0)
|
||||||
{
|
{
|
||||||
if (!player->jumping)
|
if (!player->jumping)
|
||||||
firstdrill = true;
|
firstdrill = true;
|
||||||
|
@ -7003,7 +7003,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
if (player->charability2 == CA2_MULTIABILITY)
|
if (player->charability2 == CA2_MULTIABILITY)
|
||||||
{
|
{
|
||||||
// Adventure-style flying by just holding the button down
|
// Adventure-style flying by just holding the button down
|
||||||
if (cmd->buttons & BT_JUMP && !(player->pflags & PF_STASIS) && !player->exiting)
|
if (cmd->buttons & BT_DRIFT && !(player->pflags & PF_STASIS) && !player->exiting)
|
||||||
P_SetObjectMomZ(player->mo, actionspd/4, true);
|
P_SetObjectMomZ(player->mo, actionspd/4, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -8001,7 +8001,7 @@ static void P_DeathThink(player_t *player)
|
||||||
// continue logic
|
// continue logic
|
||||||
if (!(netgame || multiplayer) && player->lives <= 0)
|
if (!(netgame || multiplayer) && player->lives <= 0)
|
||||||
{
|
{
|
||||||
if (player->deadtimer > TICRATE && (cmd->buttons & BT_BRAKE || cmd->buttons & BT_ACCELERATE || cmd->buttons & BT_JUMP) && player->continues > 0)
|
if (player->deadtimer > TICRATE && (cmd->buttons & BT_BRAKE || cmd->buttons & BT_ACCELERATE || cmd->buttons & BT_DRIFT) && player->continues > 0)
|
||||||
G_UseContinue();
|
G_UseContinue();
|
||||||
else if (player->deadtimer >= gameovertics)
|
else if (player->deadtimer >= gameovertics)
|
||||||
G_UseContinue(); // Even if we don't have one this handles ending the game
|
G_UseContinue(); // Even if we don't have one this handles ending the game
|
||||||
|
|
Loading…
Reference in New Issue