1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 20:20:02 +00:00

cPedParams fixes

This commit is contained in:
Sergeanur 2020-12-25 17:42:40 +02:00
parent fa6eb3a64f
commit 9345efbafb

View file

@ -2572,12 +2572,8 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
bool noReflections; bool noReflections;
bool isHeli; bool isHeli;
float maxDist; float maxDist;
cPedParams pedParams;
static uint8 GunIndex = 53; static uint8 GunIndex = 53;
pedParams.m_pPed = nil;
pedParams.m_bDistanceCalculated = false;
pedParams.m_fDistance = 0.0f;
for (int i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) { for (int i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
noReflections = false; noReflections = false;
isHeli = false; isHeli = false;
@ -3017,6 +3013,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
break; break;
} }
case SOUND_PED_HELI_PLAYER_FOUND: { case SOUND_PED_HELI_PLAYER_FOUND: {
cPedParams pedParams;
pedParams.m_bDistanceCalculated = params.m_bDistanceCalculated; pedParams.m_bDistanceCalculated = params.m_bDistanceCalculated;
pedParams.m_fDistance = params.m_fDistance; pedParams.m_fDistance = params.m_fDistance;
SetupPedComments(pedParams, SOUND_PED_HELI_PLAYER_FOUND); SetupPedComments(pedParams, SOUND_PED_HELI_PLAYER_FOUND);
@ -3031,6 +3028,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
SetupPedComments(&pedParams, SOUND_PED_BODYCAST_HIT); SetupPedComments(&pedParams, SOUND_PED_BODYCAST_HIT);
continue; */ continue; */
case SOUND_PED_VCPA_PLAYER_FOUND: { case SOUND_PED_VCPA_PLAYER_FOUND: {
cPedParams pedParams;
pedParams.m_bDistanceCalculated = params.m_bDistanceCalculated; pedParams.m_bDistanceCalculated = params.m_bDistanceCalculated;
pedParams.m_fDistance = params.m_fDistance; pedParams.m_fDistance = params.m_fDistance;
SetupPedComments(pedParams, SOUND_PED_VCPA_PLAYER_FOUND); SetupPedComments(pedParams, SOUND_PED_VCPA_PLAYER_FOUND);
@ -4120,13 +4118,9 @@ cAudioManager::ProcessPed(CPhysical *ped)
{ {
cPedParams params; cPedParams params;
params.m_pPed = nil;
params.m_bDistanceCalculated = false;
params.m_fDistance = 0.0f;
m_sQueueSample.m_vecPos = ped->GetPosition(); m_sQueueSample.m_vecPos = ped->GetPosition();
//params.m_bDistanceCalculated = false; params.m_bDistanceCalculated = false;
params.m_pPed = (CPed *)ped; params.m_pPed = (CPed *)ped;
params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
ProcessPedOneShots(params); ProcessPedOneShots(params);
@ -8167,9 +8161,6 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
uint8 emittingVolume; uint8 emittingVolume;
float distSquared; float distSquared;
cPedParams male;
cPedParams female;
static uint8 iSound = 0; static uint8 iSound = 0;
switch (sound) { switch (sound) {
@ -8223,19 +8214,19 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bRequireReflection = false; m_sQueueSample.m_bRequireReflection = false;
break; break;
case SCRIPT_SOUND_MALE_AMBULANCE_OUCH: case SCRIPT_SOUND_MALE_AMBULANCE_OUCH:
male.m_bDistanceCalculated = false; {
male.m_fDistance = 0.0f; cPedParams pedParams;
male.m_pPed = nil; pedParams.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
male.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); SetupPedComments(pedParams, SOUND_INJURED_PED_MALE_OUCH);
SetupPedComments(male, SOUND_INJURED_PED_MALE_OUCH);
return; return;
}
case SCRIPT_SOUND_FEMALE_AMBULANCE_OUCH: case SCRIPT_SOUND_FEMALE_AMBULANCE_OUCH:
female.m_bDistanceCalculated = false; {
female.m_fDistance = 0.0f; cPedParams pedParams;
female.m_pPed = nil; pedParams.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
female.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); SetupPedComments(pedParams, SOUND_INJURED_PED_FEMALE);
SetupPedComments(female, SOUND_INJURED_PED_FEMALE);
return; return;
}
case SCRIPT_SOUND_SEAPLANE_LOW_FUEL: case SCRIPT_SOUND_SEAPLANE_LOW_FUEL:
m_sQueueSample.m_fSoundIntensity = 1000.0f; m_sQueueSample.m_fSoundIntensity = 1000.0f;
m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_LOW; m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_LOW;