mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 12:29:01 +00:00
cAudioManager::ProcessBoatEngine fixes
This commit is contained in:
parent
b8bf3cb790
commit
03c3eeb937
1 changed files with 4 additions and 4 deletions
|
@ -2400,7 +2400,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
|
||||||
CBoat *boat;
|
CBoat *boat;
|
||||||
float padRelativeAccerate;
|
float padRelativeAccerate;
|
||||||
float gasPedal;
|
float gasPedal;
|
||||||
int32 padAccelerate;
|
float padAccelerate;
|
||||||
uint8 emittingVol;
|
uint8 emittingVol;
|
||||||
float oneShotVol;
|
float oneShotVol;
|
||||||
|
|
||||||
|
@ -2436,10 +2436,10 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
|
||||||
}
|
}
|
||||||
if (FindPlayerVehicle() == params.m_pVehicle) {
|
if (FindPlayerVehicle() == params.m_pVehicle) {
|
||||||
padAccelerate = Max(Pads[0].GetAccelerate(), Pads[0].GetBrake());
|
padAccelerate = Max(Pads[0].GetAccelerate(), Pads[0].GetBrake());
|
||||||
padRelativeAccerate = padAccelerate / 255;
|
padRelativeAccerate = padAccelerate / 255.0f;
|
||||||
emittingVol = (100.f * padRelativeAccerate) + 15;
|
emittingVol = (100.f * padRelativeAccerate) + 15;
|
||||||
m_sQueueSample.m_nFrequency = (3000.f * padRelativeAccerate) + 6000;
|
m_sQueueSample.m_nFrequency = (3000.f * padRelativeAccerate) + 6000;
|
||||||
if (!boat->m_bIsAnchored)
|
if (!boat->bPropellerInWater)
|
||||||
m_sQueueSample.m_nFrequency = 11 * m_sQueueSample.m_nFrequency / 10;
|
m_sQueueSample.m_nFrequency = 11 * m_sQueueSample.m_nFrequency / 10;
|
||||||
} else {
|
} else {
|
||||||
gasPedal = Abs(boat->m_fGasPedal);
|
gasPedal = Abs(boat->m_fGasPedal);
|
||||||
|
@ -2449,7 +2449,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
|
||||||
} else {
|
} else {
|
||||||
emittingVol = (100.f * gasPedal) + 15;
|
emittingVol = (100.f * gasPedal) + 15;
|
||||||
m_sQueueSample.m_nFrequency = (3000.f * gasPedal) + 6000;
|
m_sQueueSample.m_nFrequency = (3000.f * gasPedal) + 6000;
|
||||||
if (!boat->m_bIsAnchored)
|
if (!boat->bPropellerInWater)
|
||||||
m_sQueueSample.m_nFrequency = 11 * m_sQueueSample.m_nFrequency / 10;
|
m_sQueueSample.m_nFrequency = 11 * m_sQueueSample.m_nFrequency / 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue