Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
with
5 additions
and
12 deletions.
-
+5
−12
src/audio/AudioLogic.cpp
There are no files selected for viewing
|
|
@@ -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)
|
|
|
|