diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 1697f1e7a..9c3555d7e 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -968,10 +968,11 @@ void D_RegisterClientCommands(void) // g_input.c CV_RegisterVar(&cv_controlperkey); - CV_RegisterVar(&cv_turnsmooth); for (i = 0; i < MAXSPLITSCREENPLAYERS; i++) { + CV_RegisterVar(&cv_turnsmooth[i]); + CV_RegisterVar(&cv_turnaxis[i]); CV_RegisterVar(&cv_moveaxis[i]); CV_RegisterVar(&cv_camturnaxis[i]); diff --git a/src/g_game.c b/src/g_game.c index fe45a5185..d1f760c97 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1022,8 +1022,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) else th = 0; - if (th < SLOWTURNTICS) - tspeed = cv_turnsmooth.value == 2 ? 2 : 0; // slow turn + if (th < (cv_turnsmooth[forplayer].value * 3)) + tspeed = cv_turnsmooth[forplayer].value == 2 ? 2 : 0; // slow turn else tspeed = 1; diff --git a/src/g_game.h b/src/g_game.h index 6b5d1c8cc..249ecbff1 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -155,7 +155,6 @@ typedef enum // mouseaiming (looking up/down with the mouse or keyboard) #define KB_LOOKSPEED (1<<25) #define MAXPLMOVE (50) -#define SLOWTURNTICS (cv_turnsmooth.value * 3) // build an internal map name MAPxx from map number const char *G_BuildMapName(INT32 map); diff --git a/src/g_input.c b/src/g_input.c index 09ed3303a..e8bc8223e 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -37,7 +37,13 @@ static CV_PossibleValue_t turnsmooth_cons_t[] = {{2, "Slow"}, {1, "Fast"}, {0, " consvar_t cv_mousesens = {"mousesens", "20", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_mouseysens = {"mouseysens", "20", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_controlperkey = {"controlperkey", "One", CV_SAVE, onecontrolperkey_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_turnsmooth = {"turnsmoothing", "Slow", CV_SAVE, turnsmooth_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; + +consvar_t cv_turnsmooth[MAXSPLITSCREENPLAYERS] = { + {"turnsmoothing", "Slow", CV_SAVE, turnsmooth_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}, + {"turnsmoothing2", "Slow", CV_SAVE, turnsmooth_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}, + {"turnsmoothing3", "Slow", CV_SAVE, turnsmooth_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}, + {"turnsmoothing4", "Slow", CV_SAVE, turnsmooth_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL} +}; static void G_ResetPlayerDeviceRumble(INT32 player); static void rumble_off_handle(void); diff --git a/src/g_input.h b/src/g_input.h index 970560a35..ec4a9d795 100644 --- a/src/g_input.h +++ b/src/g_input.h @@ -110,7 +110,8 @@ typedef enum // mouse values are used once extern consvar_t cv_mousesens, cv_mouseysens; -extern consvar_t cv_controlperkey, cv_turnsmooth; +extern consvar_t cv_controlperkey; +extern consvar_t cv_turnsmooth[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_rumble[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS]; diff --git a/src/m_menudefs.c b/src/m_menudefs.c index ca17cafa8..e02113026 100644 --- a/src/m_menudefs.c +++ b/src/m_menudefs.c @@ -645,16 +645,20 @@ static menuitem_t OP_ControlsMenu[] = {IT_CALL | IT_STRING, NULL, "Player 3 Controls...", &M_Setup3PControlsMenu, 30}, {IT_CALL | IT_STRING, NULL, "Player 4 Controls...", &M_Setup4PControlsMenu, 40}, - {IT_SUBMENU | IT_STRING, NULL, "Mouse Options...", &OP_MouseOptionsDef, 60}, + {IT_SUBMENU | IT_STRING, NULL, "Mouse Options...", &OP_MouseOptionsDef, 55}, - {IT_STRING | IT_CVAR, NULL, "Controls per key", &cv_controlperkey, 80}, - {IT_STRING | IT_CVAR, NULL, "Digital turn easing", &cv_turnsmooth, 90}, + {IT_STRING | IT_CVAR, NULL, "Controls per key", &cv_controlperkey, 75}, + + {IT_STRING | IT_CVAR, NULL, "Digital turn easing (P1)", &cv_turnsmooth[0], 85}, + {IT_STRING | IT_CVAR, NULL, "Digital turn easing (P2)", &cv_turnsmooth[1], 95}, + {IT_STRING | IT_CVAR, NULL, "Digital turn easing (P3)", &cv_turnsmooth[2], 105}, + {IT_STRING | IT_CVAR, NULL, "Digital turn easing (P4)", &cv_turnsmooth[3], 115}, // i hate our menus sincerly - {IT_STRING | IT_CVAR, NULL, "Lite Steer (P1)", &cv_litesteer[0], 110}, - {IT_STRING | IT_CVAR, NULL, "Lite Steer (P2)", &cv_litesteer[1], 120}, - {IT_STRING | IT_CVAR, NULL, "Lite Steer (P3)", &cv_litesteer[2], 130}, - {IT_STRING | IT_CVAR, NULL, "Lite Steer (P4)", &cv_litesteer[3], 140}, + {IT_STRING | IT_CVAR, NULL, "Lite Steer (P1)", &cv_litesteer[0], 135}, + {IT_STRING | IT_CVAR, NULL, "Lite Steer (P2)", &cv_litesteer[1], 145}, + {IT_STRING | IT_CVAR, NULL, "Lite Steer (P3)", &cv_litesteer[2], 155}, + {IT_STRING | IT_CVAR, NULL, "Lite Steer (P4)", &cv_litesteer[3], 165}, }; static const char* OP_ControlsTooltips[] = @@ -665,7 +669,10 @@ static const char* OP_ControlsTooltips[] = "Setup player 4 controls.", "Options for mouse control.", "Allowed amount of controls per key.", - "Turn smoothing for non-analog turning.", + "Turn smoothing for non-analog turning (Player 1).", + "Turn smoothing for non-analog turning (Player 2).", + "Turn smoothing for non-analog turning (Player 3).", + "Turn smoothing for non-analog turning (Player 4).", "Hold DOWN on d-pad/keyboard for shallow turns (Player 1).", "Hold DOWN on d-pad/keyboard for shallow turns (Player 2).", @@ -2435,7 +2442,7 @@ menu_t OP_MainDef = NULL }; -menu_t OP_ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_ControlsMenu, &OP_MainDef, 60, 30, OP_ControlsTooltips); +menu_t OP_ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_ControlsMenu, &OP_MainDef, 40, 15, OP_ControlsTooltips); //WTF menu_t OP_MouseOptionsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_MouseOptionsMenu, &OP_ControlsDef, 60, 30, OP_MouseTooltips); menu_t OP_AllControlsDef = CONTROLMENUSTYLE(OP_AllControlsMenu, &OP_ControlsDef);