summaryrefslogtreecommitdiffstats
path: root/src/audio/PoliceRadio.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-02-25 18:24:45 +0100
committerFilip Gawin <filip.gawin@zoho.com>2020-03-22 17:30:54 +0100
commit7c425ac4ac17788b2a00bab7e9c4a1f1556d292f (patch)
treef0319754a4e8f9638d39d1e43449eb6d8351c835 /src/audio/PoliceRadio.cpp
parentImplement SetupJumboEngineSound (diff)
downloadre3-7c425ac4ac17788b2a00bab7e9c4a1f1556d292f.tar
re3-7c425ac4ac17788b2a00bab7e9c4a1f1556d292f.tar.gz
re3-7c425ac4ac17788b2a00bab7e9c4a1f1556d292f.tar.bz2
re3-7c425ac4ac17788b2a00bab7e9c4a1f1556d292f.tar.lz
re3-7c425ac4ac17788b2a00bab7e9c4a1f1556d292f.tar.xz
re3-7c425ac4ac17788b2a00bab7e9c4a1f1556d292f.tar.zst
re3-7c425ac4ac17788b2a00bab7e9c4a1f1556d292f.zip
Diffstat (limited to 'src/audio/PoliceRadio.cpp')
-rw-r--r--src/audio/PoliceRadio.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/audio/PoliceRadio.cpp b/src/audio/PoliceRadio.cpp
index 42ad3829..a1f719ea 100644
--- a/src/audio/PoliceRadio.cpp
+++ b/src/audio/PoliceRadio.cpp
@@ -91,7 +91,7 @@ cAudioManager::InitialisePoliceRadio()
SampleManager.SetChannelReverbFlag(policeChannel, 0);
gSpecialSuspectLastSeenReport = false;
for (int32 i = 0; i < ARRAY_SIZE(gMinTimeToNextReport); i++)
- gMinTimeToNextReport[i] = m_nTimeOfRecentCrime;
+ gMinTimeToNextReport[i] = m_FrameCounter;
}
void
@@ -670,7 +670,7 @@ cAudioManager::ReportCrime(int32 type, const CVector *pos)
{
int32 lastCrime = ARRAY_SIZE(m_sPoliceRadioQueue.crimes);
if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 &&
- (type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_nTimeOfRecentCrime >= gMinTimeToNextReport[type]) {
+ (type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
if (m_sPoliceRadioQueue.crimes[i].type) {
if (m_sPoliceRadioQueue.crimes[i].type == type) {
@@ -687,7 +687,7 @@ cAudioManager::ReportCrime(int32 type, const CVector *pos)
m_sPoliceRadioQueue.crimes[lastCrime].type = type;
m_sPoliceRadioQueue.crimes[lastCrime].position = *pos;
m_sPoliceRadioQueue.crimes[lastCrime].timer = 0;
- gMinTimeToNextReport[type] = m_nTimeOfRecentCrime + 500;
+ gMinTimeToNextReport[type] = m_FrameCounter + 500;
}
}
}
@@ -783,4 +783,4 @@ InjectHook(0x57F1B0, &cAudioManager::ServicePoliceRadioChannel, PATCH_JUMP);
InjectHook(0x57F020, &cAudioManager::SetMissionScriptPoliceAudio, PATCH_JUMP);
InjectHook(0x57F5B0, &cAudioManager::SetupCrimeReport, PATCH_JUMP);
InjectHook(0x57FCC0, &cAudioManager::SetupSuspectLastSeenReport, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
+ENDPATCHES