diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-11 14:21:34 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-11 14:21:34 +0100 |
commit | e6a5bb579d0969245f34119ef2489f47039c523e (patch) | |
tree | e8b0b922cd28d6f83d7bf59ea1b69bbb84d0fd04 /src/crepe/system/AudioSystem.cpp | |
parent | 7b8de90699aea153e73b5f2cee05c69b966b81be (diff) | |
parent | 78c4a8772526f40c531b5402b56932b0a41e22e8 (diff) |
Merge branch 'master' into niels/remove_singleton
Diffstat (limited to 'src/crepe/system/AudioSystem.cpp')
-rw-r--r-- | src/crepe/system/AudioSystem.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/crepe/system/AudioSystem.cpp b/src/crepe/system/AudioSystem.cpp index b2c1dc6..b1aa0f8 100644 --- a/src/crepe/system/AudioSystem.cpp +++ b/src/crepe/system/AudioSystem.cpp @@ -26,12 +26,11 @@ 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; |