port "Lite Steer" from RR

took me a while to realize RR makes everything go though "analogue" input handlers
This commit is contained in:
Alug committed 2025-10-16 21:53:24 +02:00
1 parent 02b2723074
commit 0f45f62fa8
5 files changed
+33 -5

No files matched your search

+2
View File
@@ -988,6 +988,8 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_xdeadzone[i]);
CV_RegisterVar(&cv_ydeadzone[i]);
CV_RegisterVar(&cv_litesteer[i]);
CV_RegisterVar(&cv_usejoystick[i]);
CV_RegisterVar(&cv_joyscale[i]);
CV_RegisterVar(&cv_rumble[i]);
+13
View File
@@ -453,6 +453,13 @@ consvar_t cv_ydeadzone[MAXSPLITSCREENPLAYERS] = {
{"joy4_ydeadzone", "0.5", CV_FLOAT|CV_SAVE, deadzone_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}
};
consvar_t cv_litesteer[MAXSPLITSCREENPLAYERS] = {
{"litesteer", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
{"litesteer2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
{"litesteer3", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
{"litesteer4", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}
};
static CV_PossibleValue_t driftsparkpulse_t[] = {{0, "MIN"}, {FRACUNIT*3, "MAX"}, {0, NULL}};
consvar_t cv_driftsparkpulse = {"driftsparkpulse", "1.4", CV_FLOAT | CV_SAVE, driftsparkpulse_t, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -1045,6 +1052,12 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
//THIS WORKS WTF????????
cmd->angleturn -= (mousex*(encoremode ? -1 : 1)*8);
}
// Digital users can input diagonal-back for shallow turns.
if (cv_litesteer[forplayer].value && InputDown(gc_aimbackward, ssplayer)
&& abs(cmd->angleturn) == KART_FULLTURN) // My keyboard hits 1024 but my keyboard only hits 1023, video games
{
cmd->angleturn /= 2;
}
if (objectplacing) // SRB2Kart: spectators need special controls // not anymore huehuehue
+2
View File
@@ -72,6 +72,8 @@ extern consvar_t cv_custom3axis[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_xdeadzone[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_ydeadzone[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_litesteer[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_ghost_besttime, cv_ghost_bestlap, cv_ghost_last, cv_ghost_guest, cv_ghost_staff;
// Hud offsets
+14 -3
View File
@@ -645,10 +645,16 @@ 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, 60},
{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, 80},
{IT_STRING | IT_CVAR, NULL, "Digital turn easing", &cv_turnsmooth, 90},
// 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},
};
static const char* OP_ControlsTooltips[] =
@@ -660,6 +666,11 @@ static const char* OP_ControlsTooltips[] =
"Options for mouse control.",
"Allowed amount of controls per key.",
"Turn smoothing for non-analog turning.",
"Hold DOWN on d-pad/keyboard for shallow turns (Player 1).",
"Hold DOWN on d-pad/keyboard for shallow turns (Player 2).",
"Hold DOWN on d-pad/keyboard for shallow turns (Player 3).",
"Hold DOWN on d-pad/keyboard for shallow turns (Player 4).",
};
static menuitem_t OP_AllControlsMenu[] =
+2 -2
View File
@@ -779,7 +779,7 @@ void ST_Drawer(void)
LUA_HUD_DrawList(luahuddrawlist_game[i]);
// draw Midnight Channel's overlay ontop
if (mapheaderinfo[gamemap-1]->typeoflevel & TOL_TV) // Very specific Midnight Channel stuff.
if (mapheaderinfo[gamemap-1]->typeoflevel & TOL_TV) // Very specific Midnight Channel stuff.
ST_MayonakaStatic();
}
@@ -787,7 +787,7 @@ void ST_Drawer(void)
if (timeinmap < 15)
{
if (timeinmap <= 5)
V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,120); // Pure white on first few frames, to hide SRB2's awful level load artifacts
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120); // Pure white on first few frames, to hide SRB2's awful level load artifacts
else
V_DrawFadeScreen(120, 15-timeinmap); // Then gradually fade out from there
}