summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-16 20:00:27 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-16 20:00:27 +0200
commit4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e (patch)
tree25d706e50fb112b64c9d8004d9dbc0dd87304d69 /src/audio/AudioLogic.cpp
parentMove sound processors to AudioLogic.cpp, plus small fixes (diff)
downloadre3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar.gz
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar.bz2
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar.lz
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar.xz
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar.zst
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.zip
Diffstat (limited to 'src/audio/AudioLogic.cpp')
-rw-r--r--src/audio/AudioLogic.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 05483617..2a6581ee 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -1304,7 +1304,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != 0);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
SampleManager.StartChannel(m_nActiveSamples);
}
LastAccel = accelerateState;
@@ -1326,7 +1326,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != 0);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
SampleManager.StartChannel(m_nActiveSamples);
}
LastAccel = accelerateState;
@@ -1349,7 +1349,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
freq /= 2;
SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != 0);
+ SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
SampleManager.StartChannel(m_nActiveSamples);
}
LastAccel = accelerateState;
@@ -1515,11 +1515,10 @@ cAudioManager::GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automo
{
float relativeVelChange;
- if (automobile->m_aWheelState[wheel] == 2) {
+ if (automobile->m_aWheelState[wheel] == WHEEL_STATE_SKIDDING)
relativeVelChange = Min(1.0f, Abs(velocityChange) / transmission->fMaxVelocity);
- } else {
+ else
relativeVelChange = 0.0f;
- }
return Max(relativeVelChange, Min(1.0f, Abs(automobile->m_vecTurnSpeed.z) * 20.0f));
}
@@ -1606,7 +1605,7 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams *params)
if (params->m_fDistance < SQR(SOUND_INTENSITY)) {
CVehicle *veh = params->m_pVehicle;
- if (veh->m_bSirenOrAlarm == 0 && veh->m_nAlarmState <= 0)
+ if (veh->m_bSirenOrAlarm == false && veh->m_nAlarmState <= 0)
return;
#ifdef FIX_BUGS