let squishy speed be player choosable

idk why i just didnt do that lel
also adds stuff to the menus
This commit is contained in:
Alug committed 2025-05-02 10:58:53 +02:00
1 parent d1d9236539
commit f8b9c8290e
4 files changed
+26 -14

No files matched your search

+1 -1
View File
@@ -187,7 +187,7 @@ extern consvar_t cv_sloperolldist;
extern consvar_t cv_sparkroll;
extern consvar_t cv_spinoutroll;
extern consvar_t cv_squishdance;
extern consvar_t cv_squishdance, cv_squishdancespeed;
extern consvar_t cv_playerblendeffects;
+4
View File
@@ -156,6 +156,9 @@ consvar_t cv_saltyroll = {"hardcodehoproll", "Off", CV_SAVE, CV_OnOff, NULL, 0,
consvar_t cv_squishdance = {"squishdance", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t squishdancespeed_cons_t[] = {{20, "MIN"}, {280, "MAX"}, {0, NULL}};
consvar_t cv_squishdancespeed = {"squishdance_speed", "140", CV_SAVE, squishdancespeed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static void saltyhop_onchange(void)
{
// reset everything when toggling saltyhop
@@ -1031,6 +1034,7 @@ void K_RegisterClientKartStuff(void)
CV_RegisterVar(&cv_slamsound);
CV_RegisterVar(&cv_squishdance);
CV_RegisterVar(&cv_squishdancespeed);
CV_RegisterVar(&cv_lessflicker);
+19 -12
View File
@@ -2370,21 +2370,24 @@ static menuitem_t OP_PlayerDistortMenu[] =
{
{IT_HEADER, NULL, "Sprite Distortion", NULL, 0},
{IT_STRING | IT_CVAR, NULL, "Sprite Slope Rotation", &cv_sloperoll, 10},
{IT_STRING | IT_CVAR, NULL, "Slope Rotation Distance", &cv_sloperolldist, 15},
{IT_STRING | IT_CVAR, NULL, "Sprite Slope Rotation", &cv_sloperoll, 10},
{IT_STRING | IT_CVAR, NULL, "Slope Rotation Distance", &cv_sloperolldist, 15},
{IT_STRING | IT_CVAR, NULL, "Rotate Players when Sliptiding", &cv_sliptideroll, 25},
{IT_STRING | IT_CVAR, NULL, "Rotate Sparks and Boost Trails", &cv_sparkroll, 30},
{IT_STRING | IT_CVAR, NULL, "Rotate Bananas on Throw", &cv_bananthrowroll, 35},
{IT_STRING | IT_CVAR, NULL, "Rotate Players when Sliptiding", &cv_sliptideroll, 25},
{IT_STRING | IT_CVAR, NULL, "Rotate Sparks and Boost Trails", &cv_sparkroll, 30},
{IT_STRING | IT_CVAR, NULL, "Rotate Bananas on Throw", &cv_bananthrowroll, 35},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Player Stretch Factor", &cv_gravstretch, 45},
{IT_STRING | IT_CVAR, NULL, "Squish Sound Effect", &cv_slamsound, 50},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Player Stretch Factor", &cv_gravstretch, 45},
{IT_STRING | IT_CVAR, NULL, "Squish Sound Effect", &cv_slamsound, 50},
{IT_STRING | IT_CVAR, NULL, "Saltyhop", &cv_saltyhop, 60},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Saltyhop Height", &cv_saltyheight, 65},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Sound Effect", &cv_saltyhopsfx, 70},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Squish", &cv_saltysquish, 75},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Roll", &cv_saltyroll, 80},
{IT_STRING | IT_CVAR, NULL, "Saltyhop", &cv_saltyhop, 60},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Saltyhop Height", &cv_saltyheight, 65},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Sound Effect", &cv_saltyhopsfx, 70},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Squish", &cv_saltysquish, 75},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Roll", &cv_saltyroll, 80},
{IT_STRING | IT_CVAR, NULL, "Squishdance", &cv_squishdance, 90},
{IT_STRING | IT_CVAR, NULL, "Squishdance Speed", &cv_squishdancespeed, 96},
};
static const char* OP_PlayerDistortTooltips[] =
@@ -2402,6 +2405,8 @@ static const char* OP_PlayerDistortTooltips[] =
"Player hop sound effect.",
"Player hop squash and stretch.",
"Should the player rotation be kept during player hop.",
"Do a funny squishy dance when holding CUSTOM 3.",
"Speed of the Squishy dance in BPM.",
};
enum
@@ -2419,6 +2424,8 @@ enum
saltsound,
saltsquishy,
saltroll,
squishdance,
squishdancespd,
};
static menuitem_t OP_SaturnHudMenu[] =
+2 -1
View File
@@ -4444,7 +4444,7 @@ DoABarrelRoll (player_t *player)
// TODO: make this sane lmao
static void P_DoFunnyDance(player_t *player)
{
static const fixed_t bpm = 983040; // 140bpm ish
fixed_t bpm; // 140bpm ish
if (player->spectator || !player->mo || player->kartstuff[k_respawn] || player->mo->salty_jump) // this looks jank as hell during hop
return;
@@ -4452,6 +4452,7 @@ static void P_DoFunnyDance(player_t *player)
player->squishdance.bounce = 0;
// bpm = FixedDiv((60*TICRATE)<<FRACBITS, FLOAT_TO_FIXED(mapmusic.bpm)); << maybe can get the tempo and beat detection lib to work for bpm autodetection
bpm = FixedDiv((60*TICRATE)<<FRACBITS, FLOAT_TO_FIXED(cv_squishdancespeed.value));
player->squishdance.work = (player->squishdance.time << FRACBITS) % bpm;