summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioManager.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-30 08:33:19 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-30 08:33:19 +0200
commit145af411ab7b0c73c6c1d611dabef621f084c0f3 (patch)
treeb3864903908cf5dce6a43bd9a073582e56fd4c02 /src/audio/AudioManager.cpp
parentFerry sounds done (diff)
downloadre3-145af411ab7b0c73c6c1d611dabef621f084c0f3.tar
re3-145af411ab7b0c73c6c1d611dabef621f084c0f3.tar.gz
re3-145af411ab7b0c73c6c1d611dabef621f084c0f3.tar.bz2
re3-145af411ab7b0c73c6c1d611dabef621f084c0f3.tar.lz
re3-145af411ab7b0c73c6c1d611dabef621f084c0f3.tar.xz
re3-145af411ab7b0c73c6c1d611dabef621f084c0f3.tar.zst
re3-145af411ab7b0c73c6c1d611dabef621f084c0f3.zip
Diffstat (limited to 'src/audio/AudioManager.cpp')
-rw-r--r--src/audio/AudioManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 987194bc..c3466b59 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -1406,6 +1406,10 @@ cAudioManager::GenerateIntegerRandomNumberTable()
void
cAudioManager::DirectlyEnqueueSample(uint32 sample, uint8 bank, uint32 counter, uint32 priority, uint32 freq, uint8 volume, uint8 framesToPlay, uint32 notStereo)
{
+#ifdef FIX_BUGS
+ if (!m_bIsInitialised || m_nExtraSoundsEntity < 0) return;
+ m_sQueueSample.m_nEntityIndex = m_nExtraSoundsEntity; // not setting entity ID could cause bugs, let's use extra sounds one
+#endif
m_sQueueSample.m_nSampleIndex = sample;
m_sQueueSample.m_nBankIndex = bank;
m_sQueueSample.m_nCounter = counter;