mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Merge branch 'wavedash-sounds' into 'master'
Add sounds to sliptide zip / wavedashing See merge request KartKrew/Kart!1024
This commit is contained in:
commit
216e4064dc
3 changed files with 36 additions and 5 deletions
30
src/k_kart.c
30
src/k_kart.c
|
|
@ -3110,7 +3110,7 @@ static void K_GetKartBoostPower(player_t *player)
|
||||||
if (player->sliptideZipBoost)
|
if (player->sliptideZipBoost)
|
||||||
{
|
{
|
||||||
// NB: This is intentionally under the 25% threshold required to initiate a sliptide
|
// 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(8*FRACUNIT/10, 4*FRACUNIT, 2*SLIPTIDEHANDLING/5); // + 80% top speed, + 400% acceleration, +20% handling
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->spindashboost) // Spindash boost
|
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)
|
if (player->mo == NULL || P_MobjWasRemoved(player->mo) == true)
|
||||||
return 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 true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -4113,7 +4115,7 @@ void K_UpdateSliptideZipIndicator(player_t *player)
|
||||||
mobj->renderflags &= ~RF_DONTDRAW;
|
mobj->renderflags &= ~RF_DONTDRAW;
|
||||||
|
|
||||||
UINT32 chargeFrame = 7 - min(7, player->sliptideZip / 10);
|
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)
|
if (max(chargeFrame, decayFrame) > mobj->frame)
|
||||||
mobj->frame++;
|
mobj->frame++;
|
||||||
else if (max(chargeFrame, decayFrame) < mobj->frame)
|
else if (max(chargeFrame, decayFrame) < mobj->frame)
|
||||||
|
|
@ -9411,8 +9413,12 @@ static void K_KartDrift(player_t *player, boolean onground)
|
||||||
{
|
{
|
||||||
if (K_IsLosingSliptideZip(player) && player->sliptideZip > 0)
|
if (K_IsLosingSliptideZip(player) && player->sliptideZip > 0)
|
||||||
{
|
{
|
||||||
|
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++;
|
player->sliptideZipDelay++;
|
||||||
if (player->sliptideZipDelay > TICRATE)
|
if (player->sliptideZipDelay > TICRATE/2)
|
||||||
{
|
{
|
||||||
fixed_t maxZipPower = 2*FRACUNIT;
|
fixed_t maxZipPower = 2*FRACUNIT;
|
||||||
fixed_t minZipPower = 1*FRACUNIT;
|
fixed_t minZipPower = 1*FRACUNIT;
|
||||||
|
|
@ -9439,9 +9445,19 @@ static void K_KartDrift(player_t *player, boolean onground)
|
||||||
K_SpawnDriftBoostExplosion(player, 0);
|
K_SpawnDriftBoostExplosion(player, 0);
|
||||||
player->sliptideZip = 0;
|
player->sliptideZip = 0;
|
||||||
player->sliptideZipDelay = 0;
|
player->sliptideZipDelay = 0;
|
||||||
S_StartSound(player->mo, sfx_s3kb6);
|
S_StopSoundByID(player->mo, sfx_waved1);
|
||||||
|
S_StopSoundByID(player->mo, sfx_waved2);
|
||||||
|
S_StopSoundByID(player->mo, sfx_waved4);
|
||||||
|
S_StartSound(player->mo, sfx_waved3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
S_StopSoundByID(player->mo, sfx_waved1);
|
||||||
|
S_StopSoundByID(player->mo, sfx_waved2);
|
||||||
|
if (player->sliptideZip > 0 && !S_SoundPlaying(player->mo, sfx_waved4))
|
||||||
|
S_StartSound(player->mo, sfx_waved4);
|
||||||
|
}
|
||||||
|
|
||||||
player->aizdrifttilt -= player->aizdrifttilt / 4;
|
player->aizdrifttilt -= player->aizdrifttilt / 4;
|
||||||
player->aizdriftturn -= player->aizdriftturn / 4;
|
player->aizdriftturn -= player->aizdriftturn / 4;
|
||||||
|
|
@ -9454,6 +9470,10 @@ static void K_KartDrift(player_t *player, boolean onground)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->sliptideZipDelay = 0;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->drift
|
if (player->drift
|
||||||
|
|
|
||||||
|
|
@ -1131,6 +1131,11 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"gate04", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
{"gate04", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||||
{"gate05", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
{"gate05", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||||
|
|
||||||
|
{"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
|
// Passing sounds
|
||||||
{"pass01", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
{"pass01", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||||
{"pass02", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
{"pass02", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||||
|
|
|
||||||
|
|
@ -1199,6 +1199,12 @@ typedef enum
|
||||||
sfx_gate04,
|
sfx_gate04,
|
||||||
sfx_gate05,
|
sfx_gate05,
|
||||||
|
|
||||||
|
// Wavedashing
|
||||||
|
sfx_waved1,
|
||||||
|
sfx_waved2,
|
||||||
|
sfx_waved3,
|
||||||
|
sfx_waved4,
|
||||||
|
|
||||||
// Passing sounds
|
// Passing sounds
|
||||||
sfx_pass01,
|
sfx_pass01,
|
||||||
sfx_pass02,
|
sfx_pass02,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue