diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-26 20:14:38 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-26 20:14:38 +0200 |
commit | b2daa0e502a04267d0b07b254e4f65867b78e526 (patch) | |
tree | d912339c145e0bb8e28e0dac4fd3002944538a19 | |
parent | fixed debug teleport (diff) | |
parent | Fix acceleration sound on exiting the vehicle (diff) | |
download | re3-b2daa0e502a04267d0b07b254e4f65867b78e526.tar re3-b2daa0e502a04267d0b07b254e4f65867b78e526.tar.gz re3-b2daa0e502a04267d0b07b254e4f65867b78e526.tar.bz2 re3-b2daa0e502a04267d0b07b254e4f65867b78e526.tar.lz re3-b2daa0e502a04267d0b07b254e4f65867b78e526.tar.xz re3-b2daa0e502a04267d0b07b254e4f65867b78e526.tar.zst re3-b2daa0e502a04267d0b07b254e4f65867b78e526.zip |
-rw-r--r-- | src/audio/AudioLogic.cpp | 4 | ||||
-rw-r--r-- | src/audio/AudioManager.cpp | 16 |
2 files changed, 17 insertions, 3 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 3d7cb62f..606e9c22 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -2025,7 +2025,11 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh CurrentPretendGear = 1; bHandbrakeOnLastFrame = FALSE; } +#ifdef FIX_BUGS + if (CReplay::IsPlayingBack() || FindPlayerPed()->GetPedState() == PED_EXIT_CAR) { +#else if (CReplay::IsPlayingBack()) { +#endif accelerateState = (255.0f * Clamp(params.m_pVehicle->m_fGasPedal, 0.0f, 1.0f)); brakeState = (255.0f * Clamp(params.m_pVehicle->m_fBrakePedal, 0.0f, 1.0f)); } else { diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index b81fda6e..a1f2d3be 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -774,23 +774,30 @@ cAudioManager::AddReflectionsToRequestedQueue() uint32 oldCounter = m_sQueueSample.m_nCounter; float oldDist = m_sQueueSample.m_fDistance; CVector oldPos = m_sQueueSample.m_vecPos; +#ifndef USE_TIME_SCALE_FOR_AUDIO if ( CTimer::GetIsSlowMotionActive() ) { emittingVolume = m_sQueueSample.m_nVolume; oldFreq = m_sQueueSample.m_nFrequency; - } else { + } else +#endif emittingVolume = (9 * m_sQueueSample.m_nVolume) / 16; - } m_sQueueSample.m_MaxDistance /= 2.f; uint32 halfOldFreq = oldFreq >> 1; for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) { +#ifndef USE_TIME_SCALE_FOR_AUDIO if ( CTimer::GetIsSlowMotionActive() ) m_afReflectionsDistances[i] = (m_anRandomTable[i % 4] % 3) * 100.f / 8.f; +#endif reflectionDistance = m_afReflectionsDistances[i]; if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_MaxDistance) { +#ifndef USE_TIME_SCALE_FOR_AUDIO m_sQueueSample.m_nReflectionDelay = CTimer::GetIsSlowMotionActive() ? (reflectionDistance * 800.f / 1029.f) : (reflectionDistance * 500.f / 1029.f); +#else + m_sQueueSample.m_nReflectionDelay = reflectionDistance * 500.f / 1029.f; +#endif if (m_sQueueSample.m_nReflectionDelay > 3) { m_sQueueSample.m_fDistance = m_afReflectionsDistances[i]; SET_EMITTING_VOLUME(emittingVolume); @@ -799,9 +806,12 @@ cAudioManager::AddReflectionsToRequestedQueue() if (m_sQueueSample.m_nVolume > emittingVolume / 16) { m_sQueueSample.m_nCounter = oldCounter + (i + 1) * 256; if (m_sQueueSample.m_nLoopCount > 0) { +#ifndef USE_TIME_SCALE_FOR_AUDIO if ( CTimer::GetIsSlowMotionActive() ) { m_sQueueSample.m_nFrequency = halfOldFreq + ((halfOldFreq * i) / ARRAY_SIZE(m_afReflectionsDistances)); - } else { + } else +#endif + { noise = RandomDisplacement(m_sQueueSample.m_nFrequency / 32); if (noise > 0) m_sQueueSample.m_nFrequency -= noise; |