Possible fix of ProcessVehicleOneShots crash

This commit is contained in:
Sergeanur 2021-08-18 17:31:34 +03:00
parent a13089cd2e
commit 296e7ed9ad

View File

@ -3341,7 +3341,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
int32 frequency;
CPed *pPed = params.m_pVehicle->pDriver;
if(!pPed)
break;
continue;
if(!pPed->HasWeaponSlot(WEAPONSLOT_SUBMACHINEGUN) || (params.m_pVehicle->GetModelIndex() == MI_PREDATOR && !pPed->IsPedDoingDriveByShooting())) {
sampleIndex = SFX_UZI_LEFT;
frequency = SampleManager.GetSampleBaseFrequency(sampleIndex);