Allow passing sound volume to PlayBounceSound in ZScript

This commit is contained in:
nashmuhandes 2025-01-23 23:52:02 +08:00 committed by Ricardo Luís Vaz Silva
commit 27b6cb2f72
5 changed files with 13 additions and 11 deletions

View file

@ -3753,7 +3753,7 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
if (fabs(speed) < EQUAL_EPSILON) speed = 0;
mo->Angles.Yaw = angle;
mo->VelFromAngle(speed);
mo->PlayBounceSound(true);
mo->PlayBounceSound(true, 1.0);
}
else
{
@ -3781,7 +3781,7 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
mo->Vel *= mo->bouncefactor;
}
mo->PlayBounceSound(true);
mo->PlayBounceSound(true, 1.0);
if (mo->BounceFlags & BOUNCE_MBF) // Bring it to rest below a certain speed
{
if (fabs(mo->Vel.Z) < mo->Mass * mo->GetGravity() / 64)