From 3463456976b02896a19e69a8e96a0a6d2e7608fe Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Tue, 7 Mar 2023 04:58:17 -0700 Subject: [PATCH] Oni fixup gaiden Passive sound when holding wavedash (waved4), wavedash delay TICRATE -> TICRATE/2, wavedash delay pauses while driftboosting --- src/k_kart.c | 15 +++++++++++---- src/sounds.c | 1 + src/sounds.h | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 1b2696cb7..bd83df9cb 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3110,7 +3110,7 @@ static void K_GetKartBoostPower(player_t *player) if (player->sliptideZipBoost) { // NB: This is intentionally under the 25% threshold required to initiate a sliptide - ADDBOOST(13*FRACUNIT/20, 4*FRACUNIT, 2*SLIPTIDEHANDLING/5); // + 65% top speed, + 400% acceleration, +20% handling + ADDBOOST(9*FRACUNIT/10, 4*FRACUNIT, 2*SLIPTIDEHANDLING/5); // + 90% top speed, + 400% acceleration, +20% handling } if (player->spindashboost) // Spindash boost @@ -4068,7 +4068,9 @@ static boolean K_IsLosingSliptideZip(player_t *player) { if (player->mo == NULL || P_MobjWasRemoved(player->mo) == true) return true; - if (!K_Sliptiding(player) && player->drift == 0 && P_IsObjectOnGround(player->mo) && player->sneakertimer == 0) + if (!K_Sliptiding(player) && player->drift == 0 + && P_IsObjectOnGround(player->mo) && player->sneakertimer == 0 + && player->driftboost == 0) return true; return false; } @@ -4113,7 +4115,7 @@ void K_UpdateSliptideZipIndicator(player_t *player) mobj->renderflags &= ~RF_DONTDRAW; UINT32 chargeFrame = 7 - min(7, player->sliptideZip / 10); - UINT32 decayFrame = min(7, player->sliptideZipDelay / 5); + UINT32 decayFrame = min(7, player->sliptideZipDelay / 2); if (max(chargeFrame, decayFrame) > mobj->frame) mobj->frame++; else if (max(chargeFrame, decayFrame) < mobj->frame) @@ -9414,8 +9416,9 @@ static void K_KartDrift(player_t *player, boolean onground) if (!S_SoundPlaying(player->mo, sfx_waved2)) S_StartSound(player->mo, sfx_waved2); S_StopSoundByID(player->mo, sfx_waved1); + S_StopSoundByID(player->mo, sfx_waved4); player->sliptideZipDelay++; - if (player->sliptideZipDelay > TICRATE) + if (player->sliptideZipDelay > TICRATE/2) { fixed_t maxZipPower = 2*FRACUNIT; fixed_t minZipPower = 1*FRACUNIT; @@ -9444,6 +9447,7 @@ static void K_KartDrift(player_t *player, boolean onground) player->sliptideZipDelay = 0; S_StopSoundByID(player->mo, sfx_waved1); S_StopSoundByID(player->mo, sfx_waved2); + S_StopSoundByID(player->mo, sfx_waved4); S_StartSound(player->mo, sfx_waved3); } } @@ -9451,6 +9455,8 @@ static void K_KartDrift(player_t *player, boolean onground) { S_StopSoundByID(player->mo, sfx_waved1); S_StopSoundByID(player->mo, sfx_waved2); + if (!S_SoundPlaying(player->mo, sfx_waved4) && player->sliptideZip > 0) + S_StartSound(player->mo, sfx_waved4); } player->aizdrifttilt -= player->aizdrifttilt / 4; @@ -9465,6 +9471,7 @@ static void K_KartDrift(player_t *player, boolean onground) { player->sliptideZipDelay = 0; S_StopSoundByID(player->mo, sfx_waved2); + S_StopSoundByID(player->mo, sfx_waved4); if (!S_SoundPlaying(player->mo, sfx_waved1)) S_StartSound(player->mo, sfx_waved1); } diff --git a/src/sounds.c b/src/sounds.c index 33bd5bdbc..636b0b0f3 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1134,6 +1134,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"waved1", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"waved2", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"waved3", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"waved4", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Passing sounds {"pass01", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, diff --git a/src/sounds.h b/src/sounds.h index a1d1e1707..3a2e9ed5a 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -1203,7 +1203,8 @@ typedef enum sfx_waved1, sfx_waved2, sfx_waved3, - + sfx_waved4, + // Passing sounds sfx_pass01, sfx_pass02,