summaryrefslogtreecommitdiff
path: root/src/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio')
-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;