mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-20 19:02:37 +00:00
Restore gc_camrotate
Sorry if this breaks everyone's configs again :V
This commit is contained in:
parent
15f0e16344
commit
609258baa6
4 changed files with 86 additions and 34 deletions
20
src/g_game.c
20
src/g_game.c
|
@ -1159,13 +1159,14 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
INT32 laim, th, tspeed, forward, side, axis; //i
|
||||
const INT32 speed = 1;
|
||||
// these ones used for multiple conditions
|
||||
boolean turnleft, turnright, invertmouse, mouseaiming, lookaxis, analog, analogjoystickmove, gamepadjoystickmove, kbl;
|
||||
boolean turnleft, turnright, invertmouse, mouseaiming, lookaxis, analog, analogjoystickmove, gamepadjoystickmove, kbl, rd;
|
||||
player_t *player;
|
||||
camera_t *thiscam;
|
||||
angle_t lang;
|
||||
|
||||
static INT32 turnheld, turnheld2, turnheld3, turnheld4; // for accelerative turning
|
||||
static boolean keyboard_look, keyboard_look2, keyboard_look3, keyboard_look4; // true if lookup/down using keyboard
|
||||
static boolean resetdown, resetdown2, resetdown3, resetdown4; // don't cam reset every frame
|
||||
|
||||
switch (ssplayer)
|
||||
{
|
||||
|
@ -1176,6 +1177,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
laim = localaiming2;
|
||||
th = turnheld2;
|
||||
kbl = keyboard_look2;
|
||||
rd = resetdown2;
|
||||
G_CopyTiccmd(cmd, I_BaseTiccmd2(), 1);
|
||||
break;
|
||||
case 3:
|
||||
|
@ -1185,6 +1187,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
laim = localaiming3;
|
||||
th = turnheld3;
|
||||
kbl = keyboard_look3;
|
||||
rd = resetdown3;
|
||||
G_CopyTiccmd(cmd, I_BaseTiccmd3(), 1);
|
||||
break;
|
||||
case 4:
|
||||
|
@ -1194,6 +1197,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
laim = localaiming4;
|
||||
th = turnheld4;
|
||||
kbl = keyboard_look4;
|
||||
rd = resetdown4;
|
||||
G_CopyTiccmd(cmd, I_BaseTiccmd4(), 1);
|
||||
break;
|
||||
case 1:
|
||||
|
@ -1204,6 +1208,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
laim = localaiming;
|
||||
th = turnheld;
|
||||
kbl = keyboard_look;
|
||||
rd = resetdown;
|
||||
G_CopyTiccmd(cmd, I_BaseTiccmd(), 1); // empty, or external driver
|
||||
break;
|
||||
}
|
||||
|
@ -1400,6 +1405,15 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
if (InputDown(gc_custom3, ssplayer))
|
||||
cmd->buttons |= BT_CUSTOM3;
|
||||
|
||||
if (InputDown(gc_camreset, ssplayer))
|
||||
{
|
||||
if (thiscam->chase && !rd)
|
||||
P_ResetCamera(player, thiscam);
|
||||
rd = true;
|
||||
}
|
||||
else
|
||||
rd = false;
|
||||
|
||||
// player aiming shit, ahhhh...
|
||||
{
|
||||
INT32 player_invert = invertmouse ? -1 : 1;
|
||||
|
@ -1555,6 +1569,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
localaiming2 = laim;
|
||||
keyboard_look2 = kbl;
|
||||
turnheld2 = th;
|
||||
resetdown2 = rd;
|
||||
camspin2 = InputDown(gc_lookback, ssplayer);
|
||||
break;
|
||||
case 3:
|
||||
|
@ -1562,6 +1577,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
localaiming3 = laim;
|
||||
keyboard_look3 = kbl;
|
||||
turnheld3 = th;
|
||||
resetdown3 = rd;
|
||||
camspin3 = InputDown(gc_lookback, ssplayer);
|
||||
break;
|
||||
case 4:
|
||||
|
@ -1569,6 +1585,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
localaiming4 = laim;
|
||||
keyboard_look4 = kbl;
|
||||
turnheld4 = th;
|
||||
resetdown4 = rd;
|
||||
camspin4 = InputDown(gc_lookback, ssplayer);
|
||||
break;
|
||||
case 1:
|
||||
|
@ -1577,6 +1594,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
localaiming = laim;
|
||||
keyboard_look = kbl;
|
||||
turnheld = th;
|
||||
resetdown = rd;
|
||||
camspin = InputDown(gc_lookback, ssplayer);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1293,7 +1293,6 @@ void G_Controldefault(void)
|
|||
gamecontrol[gc_lookback ][1] = KEY_JOY1+5; // RB
|
||||
|
||||
// Extra controls
|
||||
gamecontrol[gc_camtoggle ][0] = KEY_BACKSPACE;
|
||||
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_talkkey ][0] = 't';
|
||||
|
@ -1304,10 +1303,47 @@ void G_Controldefault(void)
|
|||
gamecontrol[gc_scores ][1] = KEY_JOY1+6; // Back
|
||||
gamecontrol[gc_spectate ][1] = KEY_JOY1+7; // Start (This is sort of like MP's pause...?)
|
||||
|
||||
// Spectator controls
|
||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||
gamecontrol[gc_camreset ][0] = KEY_HOME;
|
||||
gamecontrol[gc_camtoggle ][0] = KEY_BACKSPACE;
|
||||
|
||||
// Player 2 controls
|
||||
gamecontrolbis[gc_aimforward ][0] = KEY_2HAT1+0;
|
||||
gamecontrolbis[gc_aimbackward][0] = KEY_2HAT1+1;
|
||||
gamecontrolbis[gc_turnleft ][0] = KEY_2HAT1+2;
|
||||
gamecontrolbis[gc_turnright ][0] = KEY_2HAT1+3;
|
||||
gamecontrolbis[gc_accelerate ][0] = KEY_2JOY1+0; // A
|
||||
gamecontrolbis[gc_drift ][0] = KEY_2JOY1+1; // X
|
||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+2; // B
|
||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+4; // LB
|
||||
gamecontrolbis[gc_lookback ][0] = KEY_2JOY1+5; // RB
|
||||
gamecontrolbis[gc_spectate ][0] = KEY_2JOY1+7; // Start
|
||||
|
||||
// Player 3 controls
|
||||
gamecontrol3[gc_aimforward ][0] = KEY_3HAT1+0;
|
||||
gamecontrol3[gc_aimbackward][0] = KEY_3HAT1+1;
|
||||
gamecontrol3[gc_turnleft ][0] = KEY_3HAT1+2;
|
||||
gamecontrol3[gc_turnright ][0] = KEY_3HAT1+3;
|
||||
gamecontrol3[gc_accelerate ][0] = KEY_3JOY1+0; // A
|
||||
gamecontrol3[gc_drift ][0] = KEY_3JOY1+1; // X
|
||||
gamecontrol3[gc_brake ][0] = KEY_3JOY1+2; // B
|
||||
gamecontrol3[gc_fire ][0] = KEY_3JOY1+4; // LB
|
||||
gamecontrol3[gc_lookback ][0] = KEY_3JOY1+5; // RB
|
||||
gamecontrol3[gc_spectate ][0] = KEY_3JOY1+7; // Start
|
||||
|
||||
// Player 4 controls
|
||||
gamecontrol4[gc_aimforward ][0] = KEY_4HAT1+0;
|
||||
gamecontrol4[gc_aimbackward][0] = KEY_4HAT1+1;
|
||||
gamecontrol4[gc_turnleft ][0] = KEY_4HAT1+2;
|
||||
gamecontrol4[gc_turnright ][0] = KEY_4HAT1+3;
|
||||
gamecontrol4[gc_accelerate ][0] = KEY_4JOY1+0; // A
|
||||
gamecontrol4[gc_drift ][0] = KEY_4JOY1+1; // X
|
||||
gamecontrol4[gc_brake ][0] = KEY_4JOY1+2; // B
|
||||
gamecontrol4[gc_fire ][0] = KEY_4JOY1+4; // LB
|
||||
gamecontrol4[gc_lookback ][0] = KEY_4JOY1+5; // RB
|
||||
gamecontrol4[gc_spectate ][0] = KEY_4JOY1+7; // Start
|
||||
}
|
||||
//#endif
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ typedef enum
|
|||
gc_brake,
|
||||
gc_fire,
|
||||
gc_lookback,
|
||||
gc_camreset,
|
||||
gc_camtoggle,
|
||||
gc_spectate,
|
||||
gc_lookup,
|
||||
|
|
59
src/m_menu.c
59
src/m_menu.c
|
@ -1129,7 +1129,6 @@ static menuitem_t OP_MoveControlsMenu[] =
|
|||
{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, "Toggle Chasecam", M_ChangeControl, gc_camtoggle },
|
||||
{IT_CALL | IT_STRING2, NULL, "Talk key", M_ChangeControl, gc_talkkey },
|
||||
{IT_CALL | IT_STRING2, NULL, "Team-Talk key", M_ChangeControl, gc_teamkey },
|
||||
{IT_CALL | IT_STRING2, NULL, "Rankings/Scores", M_ChangeControl, gc_scores },
|
||||
|
@ -1137,8 +1136,8 @@ static menuitem_t OP_MoveControlsMenu[] =
|
|||
{IT_CALL | IT_STRING2, NULL, "Pause", M_ChangeControl, gc_pause },
|
||||
{IT_CALL | IT_STRING2, NULL, "Console", M_ChangeControl, gc_console },
|
||||
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Spectator Controls...",&OP_SpectateControlsDef,120},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Custom Actions...", &OP_CustomControlsDef, 128},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Spectator Controls...", &OP_SpectateControlsDef, 112},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Custom Lua Actions...", &OP_CustomControlsDef, 120},
|
||||
};
|
||||
|
||||
static menuitem_t OP_SpectateControlsMenu[] =
|
||||
|
@ -1147,6 +1146,8 @@ static menuitem_t OP_SpectateControlsMenu[] =
|
|||
{IT_CALL | IT_STRING2, NULL, "Look Up", M_ChangeControl, gc_lookup },
|
||||
{IT_CALL | IT_STRING2, NULL, "Look Down", M_ChangeControl, gc_lookdown },
|
||||
{IT_CALL | IT_STRING2, NULL, "Center View", M_ChangeControl, gc_centerview},
|
||||
{IT_CALL | IT_STRING2, NULL, "Reset Camera", M_ChangeControl, gc_camreset },
|
||||
{IT_CALL | IT_STRING2, NULL, "Toggle Chasecam", M_ChangeControl, gc_camtoggle },
|
||||
};
|
||||
|
||||
static menuitem_t OP_CustomControlsMenu[] =
|
||||
|
@ -7374,13 +7375,12 @@ static void M_Setup1PControlsMenu(INT32 choice)
|
|||
setupcontrols = gamecontrol; // was called from main Options (for console player, then)
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Unhide the three non-P2 controls
|
||||
OP_MoveControlsMenu[12].status = IT_CALL|IT_STRING2;
|
||||
OP_MoveControlsMenu[13].status = IT_CALL|IT_STRING2;
|
||||
OP_MoveControlsMenu[14].status = IT_CALL|IT_STRING2;
|
||||
// Unide the pause/console controls too
|
||||
OP_MoveControlsMenu[10].status = IT_CALL|IT_STRING2;
|
||||
OP_MoveControlsMenu[11].status = IT_CALL|IT_STRING2;
|
||||
// Unhide P1-only controls
|
||||
OP_MoveControlsMenu[9].status = IT_CALL|IT_STRING2; // Talk
|
||||
OP_MoveControlsMenu[10].status = IT_CALL|IT_STRING2; // Team talk
|
||||
OP_MoveControlsMenu[11].status = IT_CALL|IT_STRING2; // Rankings
|
||||
OP_MoveControlsMenu[12].status = IT_CALL|IT_STRING2; // Pause
|
||||
OP_MoveControlsMenu[13].status = IT_CALL|IT_STRING2; // Console
|
||||
|
||||
OP_MoveControlsDef.prevMenu = &OP_P1ControlsDef;
|
||||
M_SetupNextMenu(&OP_MoveControlsDef);
|
||||
|
@ -7395,13 +7395,12 @@ static void M_Setup2PControlsMenu(INT32 choice)
|
|||
setupcontrols = gamecontrolbis;
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Hide the three non-P2 controls
|
||||
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2;
|
||||
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2;
|
||||
OP_MoveControlsMenu[14].status = IT_GRAYEDOUT2;
|
||||
// Hide the pause/console controls too
|
||||
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2;
|
||||
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2;
|
||||
// Hide P1-only controls
|
||||
OP_MoveControlsMenu[9].status = IT_GRAYEDOUT2; // Talk
|
||||
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2; // Team talk
|
||||
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Rankings
|
||||
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2; // Pause
|
||||
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2; // Console
|
||||
|
||||
OP_MoveControlsDef.prevMenu = &OP_P2ControlsDef;
|
||||
M_SetupNextMenu(&OP_MoveControlsDef);
|
||||
|
@ -7417,13 +7416,12 @@ static void M_Setup3PControlsMenu(INT32 choice)
|
|||
setupcontrols = gamecontrol3;
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Hide the three non-P3 controls
|
||||
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2;
|
||||
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2;
|
||||
OP_MoveControlsMenu[14].status = IT_GRAYEDOUT2;
|
||||
// Hide the pause/console controls too
|
||||
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2;
|
||||
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2;
|
||||
// Hide P1-only controls
|
||||
OP_MoveControlsMenu[9].status = IT_GRAYEDOUT2; // Talk
|
||||
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2; // Team talk
|
||||
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Rankings
|
||||
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2; // Pause
|
||||
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2; // Console
|
||||
|
||||
OP_MoveControlsDef.prevMenu = &OP_P3ControlsDef;
|
||||
M_SetupNextMenu(&OP_MoveControlsDef);
|
||||
|
@ -7438,13 +7436,12 @@ static void M_Setup4PControlsMenu(INT32 choice)
|
|||
setupcontrols = gamecontrol4;
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Hide the three non-P4 controls
|
||||
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2;
|
||||
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2;
|
||||
OP_MoveControlsMenu[14].status = IT_GRAYEDOUT2;
|
||||
// Hide the pause/console controls too
|
||||
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2;
|
||||
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2;
|
||||
// Hide P1-only controls
|
||||
OP_MoveControlsMenu[9].status = IT_GRAYEDOUT2; // Talk
|
||||
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2; // Team talk
|
||||
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Rankings
|
||||
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2; // Pause
|
||||
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2; // Console
|
||||
|
||||
OP_MoveControlsDef.prevMenu = &OP_P4ControlsDef;
|
||||
M_SetupNextMenu(&OP_MoveControlsDef);
|
||||
|
|
Loading…
Reference in a new issue