diff options
Diffstat (limited to 'src/crepe')
-rw-r--r-- | src/crepe/system/AudioSystem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/system/AudioSystem.cpp b/src/crepe/system/AudioSystem.cpp index b2c1dc6..ddba268 100644 --- a/src/crepe/system/AudioSystem.cpp +++ b/src/crepe/system/AudioSystem.cpp @@ -26,12 +26,12 @@ void AudioSystem::diff_update(AudioSource & component, Sound & resource) { SoundContext & context = this->get_context(); if (component.active != component.last_active) { - if (component.active) { - component.oneshot_play = component.play_on_awake; - } else { + if (!component.active) { context.stop(component.voice); return; } + if (component.play_on_awake) + component.oneshot_play = true; } if (!component.active) return; |