summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio/AudioLogic.cpp20
-rw-r--r--src/audio/AudioManager.h4
-rw-r--r--src/audio/PoliceRadio.cpp1
3 files changed, 13 insertions, 12 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 78cebf0e..d7f20aec 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -307,7 +307,7 @@ cAudioManager::ProcessPlayerMood()
if (m_nPlayerMoodTimer <= curTime) {
playerPed = FindPlayerPed();
if (playerPed != nil) {
-#ifdef 0
+/*
if (playerPed->m_pWanted->m_nWantedLevel > 3) {
m_nPlayerMood = 2;
return;
@@ -316,7 +316,7 @@ cAudioManager::ProcessPlayerMood()
m_nPlayerMood = 1;
return;
}
-#endif
+*/
if (playerPed->m_pWanted->m_nWantedLevel > 1) {
m_nPlayerMood = (playerPed->m_pWanted->m_nWantedLevel > 3) ? 2 : 1;
return;
@@ -6165,29 +6165,29 @@ cAudioManager::ProcessFireHydrant()
const float SOUND_INTENSITY = 35;
float distSquared;
+ bool distCalculated = 0;
m_sQueueSample.m_vecPos = ((CEntity *)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity)->GetPosition();
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
if (distSquared < SQR(SOUND_INTENSITY)) {
- m_sQueueSample.m_fDistance = distSquared <= 0.0f ? 0.0f : Sqrt(distSquared);
+ CalculateDistance(distCalculated, distSquared);
m_sQueueSample.m_nVolume = ComputeVolume(40, 35.0f, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
- m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
- m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nReleasingVolumeModificator = 4;
m_sQueueSample.m_nFrequency = 15591;
- m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nEmittingVolume = 40;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
AddSampleToRequestedQueue();
}
}
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 57293442..a7d987da 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -342,7 +342,7 @@ public:
void ProcessPedOneShots(cPedParams *params); //
void ProcessPhysical(int32 id); // done
void ProcessPlane(cVehicleParams *params); // done
- void ProcessPlayerMood(); // done(need redo pointer)
+ void ProcessPlayerMood(); // done
void ProcessPlayersVehicleEngine(cVehicleParams *params, CVehicle* veh); // done
void ProcessProjectiles(); // done
void ProcessRainOnVehicle(cVehicleParams *params); // done
@@ -373,7 +373,7 @@ public:
void ReacquireDigitalHandle() const; // done
void ReleaseDigitalHandle() const; // done
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); // done
- void ReportCrime(int32 crime, const CVector *pos); // done
+ void ReportCrime(eCrimeType crime, const CVector &pos); // done
void ResetAudioLogicTimers(uint32 timer); // done
void ResetPoliceRadio(); // done
void ResetTimers(uint32 time); // done
diff --git a/src/audio/PoliceRadio.cpp b/src/audio/PoliceRadio.cpp
index 2f0c7fc3..781040d6 100644
--- a/src/audio/PoliceRadio.cpp
+++ b/src/audio/PoliceRadio.cpp
@@ -686,6 +686,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
float halfY;
float quarterX;
float quarterY;
+ int32 sample;
bool processed = false;
CVector vec = CVector(x, y, z);