mirror of https://github.com/GTAmodding/re3.git
Fix car fake/cruise top gear SFX at high FPS.
This commit is contained in:
parent
6f8ba21552
commit
2d3f93e60e
|
@ -1977,11 +1977,18 @@ PlayCruising:
|
||||||
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) {
|
|
||||||
if (nCruising < 800)
|
#ifdef FIX_BUGS
|
||||||
++nCruising;
|
// Stop the fake top ("cruise") gear rising in pitch too quickly at high FPS.
|
||||||
} else if (nCruising > 3) {
|
if (CTimer::GetLogicalFramesPassed())
|
||||||
--nCruising;
|
#endif
|
||||||
|
{
|
||||||
|
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)
|
||||||
|
|
Loading…
Reference in New Issue