File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Core/GameEngine/Source/Common/Audio Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,11 @@ AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
440440 return AHSV_NoSound;
441441 }
442442
443+ if (!eventToAdd->getUninterruptable ()) {
444+ if (!shouldPlayLocally (eventToAdd)) {
445+ return AHSV_NotForLocal;
446+ }
447+ }
443448
444449 AudioEventRTS *audioEvent = MSGNEW (" AudioEventRTS" ) AudioEventRTS (*eventToAdd); // poolify
445450 audioEvent->setPlayingHandle ( allocateNewHandle () );
@@ -455,13 +460,6 @@ AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
455460 }
456461 }
457462
458- if (!audioEvent->getUninterruptable ()) {
459- if (!shouldPlayLocally (audioEvent)) {
460- releaseAudioEventRTS (audioEvent);
461- return AHSV_NotForLocal;
462- }
463- }
464-
465463 // cull muted audio
466464 if (audioEvent->getVolume () < m_audioSettings->m_minVolume ) {
467465#ifdef INTENSIVE_AUDIO_DEBUG
You can’t perform that action at this time.
0 commit comments