summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-25 18:57:09 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-25 18:57:09 +0100
commit03c3eeb937ca69d337b333d6dbd36f5251753e0e (patch)
tree09c1c10258ce69400ae549021e5e38f7f14af881 /src
parentcPedParams fixes (diff)
downloadre3-03c3eeb937ca69d337b333d6dbd36f5251753e0e.tar
re3-03c3eeb937ca69d337b333d6dbd36f5251753e0e.tar.gz
re3-03c3eeb937ca69d337b333d6dbd36f5251753e0e.tar.bz2
re3-03c3eeb937ca69d337b333d6dbd36f5251753e0e.tar.lz
re3-03c3eeb937ca69d337b333d6dbd36f5251753e0e.tar.xz
re3-03c3eeb937ca69d337b333d6dbd36f5251753e0e.tar.zst
re3-03c3eeb937ca69d337b333d6dbd36f5251753e0e.zip
Diffstat (limited to 'src')
-rw-r--r--src/audio/AudioLogic.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 349da2b4..54466813 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -2400,7 +2400,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
CBoat *boat;
float padRelativeAccerate;
float gasPedal;
- int32 padAccelerate;
+ float padAccelerate;
uint8 emittingVol;
float oneShotVol;
@@ -2436,10 +2436,10 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
}
if (FindPlayerVehicle() == params.m_pVehicle) {
padAccelerate = Max(Pads[0].GetAccelerate(), Pads[0].GetBrake());
- padRelativeAccerate = padAccelerate / 255;
+ padRelativeAccerate = padAccelerate / 255.0f;
emittingVol = (100.f * padRelativeAccerate) + 15;
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;
} else {
gasPedal = Abs(boat->m_fGasPedal);
@@ -2449,7 +2449,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
} else {
emittingVol = (100.f * gasPedal) + 15;
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;
}
}