mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Don't spam splash sounds on the rollout rock
This commit is contained in:
parent
1560453797
commit
a01373741b
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…
Reference in a new issue