Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Revert "Fix car fake/cruise top gear SFX at high FPS.", to make mergi…
…ng main miami branch easier. Will-reimplement

This reverts commit 2d3f93e.
  • Loading branch information
Veyrdite committed Aug 1, 2021
1 parent 0736304 commit 861da4b3676e5013033aee8d804cf9410dba4f16
Showing with 5 additions and 12 deletions.
  1. +5 −12 src/audio/AudioLogic.cpp
@@ -1977,18 +1977,11 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE); SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE);
if (isMoped || accelerateState >= 150 && wheelsOnGround && brakeState <= 0 && !params.m_pVehicle->bIsHandbrakeOn if (isMoped || accelerateState >= 150 && wheelsOnGround && brakeState <= 0 && !params.m_pVehicle->bIsHandbrakeOn
&& !lostTraction && currentGear >= params.m_pTransmission->nNumberOfGears - 1) { && !lostTraction && currentGear >= params.m_pTransmission->nNumberOfGears - 1) {

if (accelerateState >= 220 && params.m_fVelocityChange + 0.001f >= velocityChangeForAudio) {
#ifdef FIX_BUGS if (nCruising < 800)
// Stop the fake top ("cruise") gear rising in pitch too quickly at high FPS. ++nCruising;
if (CTimer::GetLogicalFramesPassed()) } else if (nCruising > 3) {
#endif --nCruising;
{
if (accelerateState >= 220 && params.m_fVelocityChange + 0.001f >= velocityChangeForAudio) {
if (nCruising < 800)
++nCruising;
} else if (nCruising > 3) {
--nCruising;
}
} }
freq = 27 * nCruising + freqModifier + 22050; freq = 27 * nCruising + freqModifier + 22050;
if (engineSoundType == SFX_BANK_TRUCK) if (engineSoundType == SFX_BANK_TRUCK)

0 comments on commit 861da4b

Please sign in to comment.