From e5e63a56a13f5ec337c01527c3ba055a40a2b686 Mon Sep 17 00:00:00 2001 From: Indev Date: Tue, 22 Apr 2025 18:24:59 +0300 Subject: [PATCH 1/2] Don't resume music when game is paused (happens when you pause -> lose window focus -> regain window focus) --- src/s_sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s_sound.c b/src/s_sound.c index 9db004a44..6aa3f74ae 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1839,7 +1839,7 @@ void S_ResumeAudio(void) if (S_MusicNotInFocus()) return; - if (I_SongPlaying() && I_SongPaused()) + if (!paused && I_SongPlaying() && I_SongPaused()) I_ResumeSong(); } From b43ca1f3c7e1e1ee1990dccaf1c570056a63496d Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 22 Apr 2025 09:27:40 +0200 Subject: [PATCH 2/2] let saltyhop work without gravstretch --- src/k_kart.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 344c1ace2..291b79409 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3462,9 +3462,6 @@ static void K_SpawnAIZDust(player_t *player) static void K_StretchPlayerGravity(player_t *player) { - if (!cv_gravstretch.value) - return; - I_Assert(player != NULL); I_Assert(!P_MobjWasRemoved(player->mo)); @@ -3515,6 +3512,30 @@ static void K_StretchPlayerGravity(player_t *player) pmo->stretchslam = 0; } +// copy pasted from above +// but here to allow salty squish to work when gravstretch is disabled +static void K_SaltySquish(player_t *player) +{ + I_Assert(player != NULL); + I_Assert(!P_MobjWasRemoved(player->mo)); + + mobj_t *pmo = player->mo; + + fixed_t tempxscale = pmo->realxscale; + fixed_t tempyscale = pmo->realyscale; + + if (pmo->stretchslam > 0) + { + const fixed_t slamDiv = FixedDiv(pmo->stretchslam, 3932160); // stretchScaleFactor = FixedDiv(FRACUNIT*60, FRACUNIT) + + pmo->spritexscale = (tempxscale + (((slamDiv*2)/3)*2)); + pmo->spriteyscale = (tempyscale - slamDiv); + pmo->stretchslam -= (4*FRACUNIT); + } + else + pmo->stretchslam = 0; +} + static void K_QuiteSaltyHop(player_t *player) { if (!cv_saltyhop.value) @@ -7028,7 +7049,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground) } // funneh Saturn sprite stuff - K_StretchPlayerGravity(player); + if (cv_gravstretch.value) + K_StretchPlayerGravity(player); + else if (cv_saltyhop.value && cv_saltysquish.value) + K_SaltySquish(player); + K_RollMobjBySlopes(player->mo, player->mo->standingslope); // Quick Turning