- prevent wheel curb hit sound interrupting other sounds

This commit is contained in:
Ilya Shurumov 2020-11-03 03:05:40 +06:00
parent fce428ecf5
commit 1704f8b03f

View File

@ -919,13 +919,16 @@ void AddWheelForcesDriver1(CAR_DATA* cp, CAR_LOCALS* cl)
{
if (ABS(newCompression - oldCompression) > 12 && (i & 1U) != 0)
{
chan = GetFreeChannel();
chan = GetFreeChannel(0);
if(chan > -1)
{
if (NumPlayers > 1 && NoPlayerControl == 0)
SetPlayerOwnsChannel(chan, player_id);
Start3DSoundVolPitch(chan, SOUND_BANK_SFX, 5, cp->hd.where.t[0], cp->hd.where.t[1], cp->hd.where.t[2], -2500, 400);
SetChannelPosition3(chan, (VECTOR*)cp->hd.where.t, NULL, -2500, 400, 0);
}
}
if (newCompression >= 85)
SetPadVibration(*cp->ai.padid, 2);