From 145af411ab7b0c73c6c1d611dabef621f084c0f3 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 30 Aug 2021 09:33:19 +0300 Subject: Fix yet another DirectlyEnqueueSample --- src/audio/AudioManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/audio') 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; -- cgit v1.2.3