make stretchfactor a cv_float again

for easier handling
now that we can use sliders this should hopefully work without issues
This commit is contained in:
Alug committed 2025-03-23 16:54:51 +01:00
1 parent 78566f067d
commit 63517e3de3
2 files changed
+4 -7

No files matched your search

+3 -6
View File
@@ -162,11 +162,8 @@ consvar_t cv_battlespeedo = {"battlespeedo", "Off", CV_SAVE, CV_OnOff, NULL, 0,
consvar_t cv_blendeffects = {"testblendeffects", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
// funn-E streeetch
static CV_PossibleValue_t stretchfactor_t[] = {
{0, "Off"}, {FRACUNIT/4, "0.250"},
{3*FRACUNIT/8, "0.375"}, {FRACUNIT/2, "0.500"}, {5*FRACUNIT/8, "0.625"},
{3*FRACUNIT/4, "0.750"}, {7*FRACUNIT/8, "0.875"}, {FRACUNIT, "Max"}, {0, NULL}};
consvar_t cv_gravstretch = {"gravstretch", "0", CV_SAVE, stretchfactor_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t stretchfactor_t[] = {{0, "MIN"}, {FRACUNIT, "MAX"}, {0, NULL}};
consvar_t cv_gravstretch = {"gravstretch", "MIN", CV_SAVE|CV_FLOAT, stretchfactor_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t slamsound_t[] = {{0, "Off"}, {1, "On"}, {0, NULL}};
consvar_t cv_slamsound = {"slamsound", "1", CV_SAVE, slamsound_t, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -3461,7 +3458,7 @@ static void K_StretchPlayerGravity(player_t *p)
fixed_t mos = FRACUNIT;
fixed_t rzs = abs(p->mo->momz);
fixed_t zspd = abs(rzs/mos);
fixed_t stretchScaleFactor = FixedDiv(FRACUNIT*60, cv_gravstretch.value);
fixed_t stretchScaleFactor = FixedDiv(FRACUNIT*60, FLOAT_TO_FIXED(cv_gravstretch.value));
fixed_t rzsDiv, slamDiv;
fixed_t dxs = p->mo->realxscale;
+1 -1
View File
@@ -2295,7 +2295,7 @@ static menuitem_t OP_PlayerDistortMenu[] =
{IT_STRING | IT_CVAR, NULL, "Rotate Sparks and Boost Trails", &cv_sparkroll, 60},
{IT_STRING | IT_CVAR, NULL, "Rotate Bananas on Throw", &cv_bananthrowroll, 75},
{IT_STRING | IT_CVAR, NULL, "Player Stretch Factor", &cv_gravstretch, 90},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Player Stretch Factor", &cv_gravstretch, 90},
{IT_STRING | IT_CVAR, NULL, "Squish Sound Effect", &cv_slamsound, 105},
{IT_STRING | IT_CVAR, NULL, "Saltyhop", &cv_saltyhop, 120},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Saltyhop Height", &cv_saltyheight, 135},