From f8b9c8290eab14ebb5a627b280f2aeac1bc1c232 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 2 May 2025 10:53:36 +0200 Subject: [PATCH] let squishy speed be player choosable idk why i just didnt do that lel also adds stuff to the menus --- src/g_game.h | 2 +- src/k_kart.c | 4 ++++ src/m_menu.c | 31 +++++++++++++++++++------------ src/p_user.c | 3 ++- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/g_game.h b/src/g_game.h index 8027d86f2..bde892309 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -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; diff --git a/src/k_kart.c b/src/k_kart.c index 0a15189a1..9178aaf58 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -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); diff --git a/src/m_menu.c b/src/m_menu.c index 63ad0c1e2..17bbdd65d 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -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[] = diff --git a/src/p_user.c b/src/p_user.c index d9f398949..e6680657f 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -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)<squishdance.work = (player->squishdance.time << FRACBITS) % bpm;