toggle for saltyhop sloperoll behaviour

This commit is contained in:
Alug committed 2025-03-24 18:20:16 +01:00
1 parent 4168dbddbb
commit 702e800d3f
3 files changed
+8 -1

No files matched your search

+1
View File
@@ -173,6 +173,7 @@ extern consvar_t cv_saltyhop;
extern consvar_t cv_saltyheight;
extern consvar_t cv_saltyhopsfx;
extern consvar_t cv_saltysquish;
extern consvar_t cv_saltyroll;
extern consvar_t cv_driftsparkpulse;
extern consvar_t cv_gravstretch;
+4 -1
View File
@@ -189,6 +189,7 @@ consvar_t cv_saltyhopsfx = {"hardcodehopsfx", "On", CV_SAVE, CV_OnOff, NULL, 0,
consvar_t cv_saltysquish = {"hardcodehopsquish", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t saltyheight_t[] = {{FRACUNIT/4, "MIN"}, {2*FRACUNIT, "MAX"}, {0, NULL}};
consvar_t cv_saltyheight = {"hardcodehopheight", "1", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, saltyheight_t, saltyheight_onchange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_saltyroll = {"hardcodehoproll", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static void saltyhop_onchange(void)
{
@@ -982,6 +983,8 @@ void K_RegisterClientKartStuff(void)
CV_RegisterVar(&cv_saltyhopsfx);
CV_RegisterVar(&cv_saltysquish);
CV_RegisterVar(&cv_saltyheight);
CV_RegisterVar(&cv_saltyroll);
CV_RegisterVar(&cv_slamsound);
CV_RegisterVar(&cv_lessflicker);
@@ -3623,7 +3626,7 @@ boolean K_ShouldSlopeRoll(mobj_t *mobj)
return false;
// seeing a character rotate mid-hop looks really janky
if (mobj->player && mobj->player->mo->salty_jump)
if (!cv_saltyroll.value && mobj->player && mobj->player->mo->salty_jump)
return false;
return K_CheckSlopeRollDist(mobj);
+3
View File
@@ -2319,6 +2319,7 @@ static menuitem_t OP_PlayerDistortMenu[] =
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Saltyhop Height", &cv_saltyheight, 135},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Sound Effect", &cv_saltyhopsfx, 150},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Squish", &cv_saltysquish, 165},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Roll", &cv_saltyroll, 180},
};
static const char* OP_PlayerDistortTooltips[] =
@@ -2335,6 +2336,7 @@ static const char* OP_PlayerDistortTooltips[] =
"Jump Height for Kart hopping.",
"Player hop sound effect.",
"Player hop squash and stretch.",
"Should the player rotation be kept during player hop.",
};
enum
@@ -2351,6 +2353,7 @@ enum
saltheight,
saltsound,
saltsquishy,
saltroll,
};
static menuitem_t OP_SaturnHudMenu[] =