summaryrefslogtreecommitdiff
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-09-02 08:00:04 +0300
committerSergeanur <s.anureev@yandex.ua>2021-09-02 08:00:04 +0300
commitc41239ed5e44cfd4f54d9478c1b08efd94e1338e (patch)
tree56724c2ba5edcda874508fe37bebf9864c95a019 /src/audio/AudioLogic.cpp
parent787f1922f412340626e9b7644fac293d987c4618 (diff)
Ped comments fixes
Diffstat (limited to 'src/audio/AudioLogic.cpp')
-rw-r--r--src/audio/AudioLogic.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 0101d94f..4b232126 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -3865,7 +3865,7 @@ cAudioManager::SetupPedComments(cPedParams &params, uint16 sound)
break;
}
m_sQueueSample.m_nVolume = ComputeVolume(Vol, maxDist, m_sQueueSample.m_fDistance);
- pedComment.m_nProcess = 10;
+ pedComment.m_nLoadingTimeout = 10;
if (m_sQueueSample.m_nVolume > 0) {
pedComment.m_nEntityIndex = m_sQueueSample.m_nEntityIndex;
pedComment.m_vecPos = m_sQueueSample.m_vecPos;
@@ -3880,7 +3880,7 @@ cAudioManager::SetupPedComments(cPedParams &params, uint16 sound)
#ifdef GTA_PS2
else {
m_sQueueSample.m_nVolume = MAX_VOLUME;
- pedComment.m_nProcess = 40;
+ pedComment.m_nLoadingTimeout = 40;
}
#endif
}
@@ -6290,11 +6290,13 @@ cPedComments::Process()
if (m_nPedCommentCount[m_nActiveQueue]) {
sampleIndex = m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nSampleIndex;
- switch (SampleManager.IsPedCommentLoaded(sampleIndex)) // yes, this was a switch
+ switch (SampleManager.IsPedCommentLoaded(sampleIndex))
{
case LOADING_STATUS_NOT_LOADED:
SampleManager.LoadPedComment(sampleIndex);
- // BUG? no break, VC has break in here
+#ifdef GTA_PS2 // on PC ped comment is loaded at once
+ break;
+#endif
case LOADING_STATUS_LOADED:
AudioManager.m_sQueueSample.m_nEntityIndex = m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nEntityIndex;
AudioManager.m_sQueueSample.m_nCounter = 0;
@@ -6391,7 +6393,7 @@ cPedComments::Process()
if (CTimer::GetIsSlowMotionActive())
AudioManager.m_sQueueSample.m_nFrequency >>= 1;
#endif
- m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nProcess = -1;
+ m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nLoadingTimeout = -1;
AudioManager.AddSampleToRequestedQueue();
break;
case LOADING_STATUS_LOADING: break;
@@ -6408,8 +6410,8 @@ cPedComments::Process()
m_nActiveQueue = 0;
}
for (uint8 i = 0; i < m_nPedCommentCount[queue]; i++) {
- if (m_aPedCommentQueue[queue][m_aPedCommentOrderList[queue][i]].m_nProcess > 0) {
- m_aPedCommentQueue[queue][m_aPedCommentOrderList[queue][i]].m_nProcess--;
+ if (m_aPedCommentQueue[queue][m_aPedCommentOrderList[queue][i]].m_nLoadingTimeout > 0) {
+ m_aPedCommentQueue[queue][m_aPedCommentOrderList[queue][i]].m_nLoadingTimeout--;
Add(&m_aPedCommentQueue[queue][m_aPedCommentOrderList[queue][i]]);
}
}