mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +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);
|
actor->momz += flip * FixedMul(locvar2, actor->scale);
|
||||||
if (actor->threshold)
|
if (actor->threshold)
|
||||||
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)
|
if (actor->eflags & MFE_UNDERWATER)
|
||||||
S_StartSound(actor, sfx_splash);
|
S_StartSound(actor, sfx_splash);
|
||||||
else if (!actor->threshold)
|
else if (!actor->threshold)
|
||||||
{
|
|
||||||
S_StartSound(actor, sfx_splish);
|
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