From 876e402d1ecc07884f8562b8b1fbc3343fa4b677 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 7 May 2020 09:38:07 +0200 Subject: dont hardcode first vehicle ID; little fix for roadblocks --- src/audio/AudioManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/audio/AudioManager.cpp') diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index ec520eaa..a417e077 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -7989,7 +7989,7 @@ cAudioManager::ProcessVehicle(CVehicle *veh) if (handling) params.m_pTransmission = &handling->Transmission; - params.m_nIndex = veh->GetModelIndex() - 90; + params.m_nIndex = veh->GetModelIndex() - MI_FIRST_VEHICLE; if (params.m_pVehicle->GetStatus() == STATUS_SIMPLE) velChange = params.m_pVehicle->AutoPilot.m_fMaxTrafficSpeed * 0.02f; else -- cgit v1.2.3 From 05a1d64fbbe374dabb6572bb47d9a745464633bb Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 7 May 2020 11:33:20 +0200 Subject: VC vehicles just barely working now --- src/audio/AudioManager.cpp | 142 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 112 insertions(+), 30 deletions(-) (limited to 'src/audio/AudioManager.cpp') diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index ec520eaa..32cc5fae 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -100,13 +100,13 @@ enum eVehicleModel { LINERUN, PEREN, SENTINEL, - PATRIOT, + RIO, FIRETRUK, TRASH, STRETCH, MANANA, INFERNUS, - BLISTA, + VOODOO, PONY, MULE, CHEETAH, @@ -115,11 +115,11 @@ enum eVehicleModel { MOONBEAM, ESPERANT, TAXI, - KURUMA, + WASHING, BOBCAT, MRWHOOP, BFINJECT, - CORPSE, + HUNTER, POLICE, ENFORCER, SECURICA, @@ -128,42 +128,83 @@ enum eVehicleModel { BUS, RHINO, BARRACKS, - TRAIN, + CUBAN, CHOPPER, - DODO, + ANGEL, COACH, CABBIE, STALLION, RUMPO, RCBANDIT, - BELLYUP, - MRWONGS, - MAFIA, - YARDIE, - YAKUZA, - DIABLOS, - COLUMB, - HOODS, + ROMERO, + PACKER, + SENTXS, + ADMIRAL, + SQUALO, + SEASPAR, + PIZZABOY, + GANGBUR, AIRTRAIN, DEADDODO, SPEEDER, REEFER, - PANLANT, + TROPIC, FLATBED, YANKEE, - ESCAPE, - BORGNINE, - TOYZ, - GHOST, - CAR151, - CAR152, - CAR153, - CAR154, - CAR155, - CAR156, - CAR157, - CAR158, - CAR159, + CADDY, + ZEBRA, + TOPFUN, + SKIMMER, + PCJ600, + FAGGIO, + FREEWAY, + RCBARON, + RCRAIDER, + GLENDALE, + OCEANIC, + SANCHEZ, + SPARROW, + PATRIOT, + LOVEFIST, + COASTG, + DINGHY, + HERMES, + SABRE, + SABRETUR, + PHEONIX, + WALTON, + REGINA, + COMET, + DELUXO, + BURRITO, + SPAND, + MARQUIS, + BAGGAGE, + KAUFMAN, + MAVERICK, + VCNMAV, + RANCHER, + FBIRANCH, + VIRGO, + GREENWOO, + JETMAX, + HOTRING, + SANDKING, + BLISTAC, + POLMAV, + BOXVILLE, + BENSON, + MESA, + RCGOBLIN, + HOTRINA, + HOTRINB, + BLOODRA, + BLOODRB, + VICECHEE, + +// HACK so this compiles +// TODO(MIAMI): check it out +DODO = -1 }; enum PLAY_STATUS : uint8 { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING = 1, PLAY_STATUS_FINISHED = 2 }; @@ -7103,7 +7144,8 @@ struct tVehicleSampleData { uint8 m_bDoorType; }; -const tVehicleSampleData aVehicleSettings[70] = {{SFX_CAR_REV_2, 2, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 9935, 1}, +// TODO(MIAMI): this is bogus. get the real data in here! +const tVehicleSampleData aVehicleSettings[110] = {{SFX_CAR_REV_2, 2, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 9935, 1}, {SFX_CAR_REV_1, 1, SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_ALARM_1, 9935, 0}, {SFX_CAR_REV_8, 8, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_ALARM_1, 10928, 1}, {SFX_CAR_REV_6, 6, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_ALARM_1, 9935, 2}, @@ -7172,6 +7214,46 @@ const tVehicleSampleData aVehicleSettings[70] = {{SFX_CAR_REV_2, 2, SFX_CAR_HORN {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, + {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}, {SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}}; void @@ -7989,7 +8071,7 @@ cAudioManager::ProcessVehicle(CVehicle *veh) if (handling) params.m_pTransmission = &handling->Transmission; - params.m_nIndex = veh->GetModelIndex() - 90; + params.m_nIndex = veh->GetModelIndex() - MI_FIRST_VEHICLE; if (params.m_pVehicle->GetStatus() == STATUS_SIMPLE) velChange = params.m_pVehicle->AutoPilot.m_fMaxTrafficSpeed * 0.02f; else -- cgit v1.2.3 From ed1bb7236f2a8cac55de8cdbd63a6dfca050f36c Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 7 May 2020 14:10:56 +0300 Subject: Fixed arguments for sound collisions --- src/audio/AudioManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/audio/AudioManager.cpp') diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index a417e077..88152f94 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -3625,14 +3625,14 @@ cAudioManager::ProcessActiveQueues() m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE; } } - for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; ++i) { + for (uint8 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; ++i) { tSound &sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]]; if (!sample.m_bIsProcessed && !sample.m_bLoopEnded && m_asAudioEntities[sample.m_nEntityIndex].m_bIsUsed && sample.m_nSampleIndex < NO_SAMPLE) { if (sample.m_nCounter > 255 && sample.m_nLoopCount && sample.m_nLoopsRemaining) { --sample.m_nLoopsRemaining; sample.m_nReleasingVolumeDivider = 1; } else { - for (int32 j = 0; j < m_nActiveSamples; ++j) { + for (uint8 j = 0; j < m_nActiveSamples; ++j) { if (!m_asActiveSamples[j].m_bIsProcessed) { if (sample.m_nLoopCount) { v28 = sample.m_nFrequency / m_nTimeSpent; -- cgit v1.2.3 From 1ac6bea590aa07af40edd2cc2346f16f334096c5 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 7 May 2020 14:32:00 +0300 Subject: Fix GetDistanceSquared --- src/audio/AudioManager.cpp | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'src/audio/AudioManager.cpp') diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 88152f94..be68d40f 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -2951,10 +2951,10 @@ cAudioManager::GetCurrent3DProviderIndex() const } float -cAudioManager::GetDistanceSquared(CVector *v) const +cAudioManager::GetDistanceSquared(const CVector &v) const { const CVector &c = TheCamera.GetPosition(); - return sq(v->x - c.x) + sq(v->y - c.y) + sq((v->z - c.z) * 0.2f); + return sq(v.x - c.x) + sq(v.y - c.y) + sq((v.z - c.z) * 0.2f); } int32 @@ -3747,7 +3747,7 @@ cAudioManager::ProcessAirportScriptObject(uint8 sound) default: return; } - float distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(110, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -3970,7 +3970,7 @@ cAudioManager::ProcessBridge() if (CBridge::pLiftRoad) { m_sQueueSample.m_vecPos = CBridge::pLiftRoad->GetPosition(); - dist = GetDistanceSquared(&m_sQueueSample.m_vecPos); + dist = GetDistanceSquared(m_sQueueSample.m_vecPos); if (dist < 202500.0f) { CalculateDistance(distCalculated, dist); switch (CBridge::State) { @@ -4206,7 +4206,7 @@ cAudioManager::ProcessCinemaScriptObject(uint8 sound) default: return; } - float distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); rand = m_anRandomTable[0] % 90 + 30; @@ -4246,7 +4246,7 @@ cAudioManager::ProcessCrane() if (crane->m_nCraneStatus == CCrane::ACTIVATED) { if (crane->m_nCraneState != CCrane::IDLE) { m_sQueueSample.m_vecPos = crane->m_pCraneEntity->GetPosition(); - distSquared = GetDistanceSquared(&this->m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(intensity)) { CalculateDistance(distCalculated, distSquared); m_sQueueSample.m_nVolume = ComputeVolume(100, 80.f, m_sQueueSample.m_fDistance); @@ -4306,7 +4306,7 @@ cAudioManager::ProcessDocksScriptObject(uint8 sound) default: return; } - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); rand = m_anRandomTable[0] % 60 + 40; @@ -4510,7 +4510,7 @@ cAudioManager::ProcessExplosions(int32 explosion) } pos = CExplosion::GetExplosionPosition(i); m_sQueueSample.m_vecPos = *pos; - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(maxVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -4541,7 +4541,7 @@ cAudioManager::ProcessFireHydrant() static const int intensity = 35; m_sQueueSample.m_vecPos = ((CEntity *)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity)->GetPosition(); - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(intensity)) { CalculateDistance(distCalculated, distSquared); m_sQueueSample.m_nVolume = ComputeVolume(40, 35.f, m_sQueueSample.m_fDistance); @@ -4611,7 +4611,7 @@ void cAudioManager::ProcessFires(int32) m_sQueueSample.m_nReleasingVolumeModificator = 8; } m_sQueueSample.m_vecPos = gFireManager.m_aFires[i].m_vecPos; - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -4875,7 +4875,7 @@ cAudioManager::ProcessGarages() continue; m_sQueueSample.m_vecPos = entity->GetPosition(); distCalculated = false; - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < 6400.f) { state = CGarages::aGarages[i].m_eGarageState; if (state == GS_OPENING || state == GS_CLOSING || state == GS_AFTERDROPOFF) { @@ -5021,7 +5021,7 @@ cAudioManager::ProcessHomeScriptObject(uint8 sound) default: return; } - dist = GetDistanceSquared(&m_sQueueSample.m_vecPos); + dist = GetDistanceSquared(m_sQueueSample.m_vecPos); if (dist < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(dist); rand = m_anRandomTable[0] % 30 + 40; @@ -5173,7 +5173,7 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound) default: return; } - float distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(45, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -5804,7 +5804,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound) return; } - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -5914,7 +5914,7 @@ cAudioManager::ProcessMissionAudio() if (m_sMissionAudio.m_bPredefinedProperties) { SampleManager.SetStreamedVolumeAndPan(80, 63, 1, 1); } else { - distSquared = GetDistanceSquared(&m_sMissionAudio.m_vecPos); + distSquared = GetDistanceSquared(m_sMissionAudio.m_vecPos); if (distSquared >= 2500.f) { emittingVol = 0; pan = 63; @@ -6017,14 +6017,14 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_L: male.m_pPed = nil; male.m_bDistanceCalculated = false; - male.m_fDistance = GetDistanceSquared(&m_sQueueSample.m_vecPos); + male.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); SetupPedComments(&male, SOUND_INJURED_PED_MALE_OUCH); return; case SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_S: case SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_L: female.m_pPed = nil; female.m_bDistanceCalculated = false; - female.m_fDistance = GetDistanceSquared(&m_sQueueSample.m_vecPos); + female.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); SetupPedComments(&female, SOUND_INJURED_PED_FEMALE); return; case SCRIPT_SOUND_GATE_START_CLUNK: @@ -6186,7 +6186,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) m_sQueueSample.m_fSpeedMultiplier = 0.0f; m_sQueueSample.m_bIs2D = false; emittingVolume = m_anRandomTable[2] % 20 + 30; - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -6231,7 +6231,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound) return; } - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -6261,7 +6261,7 @@ cAudioManager::ProcessPed(CPhysical *ped) // params.m_bDistanceCalculated = false; params.m_pPed = (CPed *)ped; - params.m_fDistance = GetDistanceSquared(&m_sQueueSample.m_vecPos); + params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); if (ped->GetModelIndex() == MI_FATMALE02) ProcessPedHeadphones(¶ms); ProcessPedOneShots(¶ms); @@ -7458,7 +7458,7 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound) default: return; } - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); if (m_FrameCounter & 1) @@ -7545,7 +7545,7 @@ cAudioManager::ProcessPornCinema(uint8 sound) default: return; } - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); if (sound != SCRIPT_SOUND_MISTY_SEX_S && sound != SCRIPT_SOUND_MISTY_SEX_L) { @@ -7622,7 +7622,7 @@ cAudioManager::ProcessProjectiles() m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_vecPos = CProjectileInfo::ms_apProjectile[i]->GetPosition(); - float distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -7762,7 +7762,7 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound) default: return; } - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -7835,7 +7835,7 @@ cAudioManager::ProcessShopScriptObject(uint8 sound) default: return; } - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -7980,7 +7980,7 @@ cAudioManager::ProcessVehicle(CVehicle *veh) m_sQueueSample.m_vecPos = veh->GetPosition(); params.m_bDistanceCalculated = false; - params.m_fDistance = GetDistanceSquared(&m_sQueueSample.m_vecPos); + params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); params.m_pVehicle = veh; params.m_pTransmission = nil; params.m_nIndex = 0; @@ -8990,7 +8990,7 @@ void cAudioManager::ProcessWaterCannon(int32) for (int32 i = 0; i < NUM_WATERCANNONS; i++) { if (CWaterCannons::aCannons[i].m_nId) { m_sQueueSample.m_vecPos = CWaterCannons::aCannons[0].m_avecPos[CWaterCannons::aCannons[i].m_nCur]; - float distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SOUND_INTENSITY) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(50, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); @@ -9136,7 +9136,7 @@ cAudioManager::ProcessWorkShopScriptObject(uint8 sound) default: return; } - distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos); + distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); -- cgit v1.2.3