mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Don't spam splash sounds on the rollout rock
This commit is contained in:
parent
e9867c4bd7
commit
561389dd9f
1 changed files with 2 additions and 4 deletions
|
|
@ -14246,15 +14246,13 @@ void A_RolloutRock(mobj_t *actor)
|
|||
actor->momz += flip * FixedMul(locvar2, actor->scale);
|
||||
if (actor->threshold)
|
||||
actor->threshold--;
|
||||
if (flip*prevmomz < 0 && flip*actor->momz >= 0)
|
||||
if (flip*prevmomz < 0 && flip*actor->momz >= 0 && !actor->threshold)
|
||||
{
|
||||
if (actor->eflags & MFE_UNDERWATER)
|
||||
S_StartSound(actor, sfx_splash);
|
||||
else if (!actor->threshold)
|
||||
{
|
||||
S_StartSound(actor, sfx_splish);
|
||||
actor->threshold = max((topspeed - speed) >> FRACBITS, 0);
|
||||
}
|
||||
actor->threshold = max((topspeed - speed) >> FRACBITS, 8);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue