fix serviceSoundEffects an cleanup

This commit is contained in:
Roman Masanin 2020-11-02 12:05:23 +03:00
parent cebf32c46c
commit 174424c520
2 changed files with 2 additions and 13 deletions

View File

@ -179,7 +179,7 @@ cAudioManager::PostInitialiseGameSpecificSetup()
ResetAudioLogicTimers(CTimer::GetTimeInMilliseconds()); ResetAudioLogicTimers(CTimer::GetTimeInMilliseconds());
m_bIsPlayerShutUp = false; m_bIsPlayerShutUp = false;
m_nPlayerMood = 0; m_nPlayerMood = PLAYER_MOOD_CALM;
m_nPlayerMoodTimer = 0; m_nPlayerMoodTimer = 0;
} }
@ -863,7 +863,7 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
} }
void void
cAudioManager::ProcessRainOnVehicle(cVehicleParams* params) cAudioManager::ProcessRainOnVehicle(cVehicleParams *params)
{ {
const int SOUND_INTENSITY = 22.0f; const int SOUND_INTENSITY = 22.0f;
@ -3151,16 +3151,6 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
} }
m_sQueueSample.m_bIs2D = false; m_sQueueSample.m_bIs2D = false;
AddSampleToRequestedQueue(); AddSampleToRequestedQueue();
/* looks like this code ca't be reached(originaly it exist bcs used goto)
if (isHeli) {
m_sQueueSample.m_nOffset = 127;
m_sQueueSample.m_nSampleIndex++;
m_sQueueSample.m_nCounter = GunIndex++;
if (GunIndex > 58)
GunIndex = 53;
m_sQueueSample.m_bRequireReflection = 0;
AddSampleToRequestedQueue();
}*/
continue; continue;
} }

View File

@ -438,7 +438,6 @@ cAudioManager::IsAudioInitialised() const
void void
cAudioManager::ServiceSoundEffects() cAudioManager::ServiceSoundEffects()
{ {
m_FrameCounter++;
m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0; m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0;
if (m_nUserPause && !m_nPreviousUserPause) { if (m_nUserPause && !m_nPreviousUserPause) {
for (int32 i = 0; i < allChannels; i++) for (int32 i = 0; i < allChannels; i++)