aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/AudioSystem.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-11 14:21:34 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-11 14:21:34 +0100
commite6a5bb579d0969245f34119ef2489f47039c523e (patch)
treee8b0b922cd28d6f83d7bf59ea1b69bbb84d0fd04 /src/crepe/system/AudioSystem.cpp
parent7b8de90699aea153e73b5f2cee05c69b966b81be (diff)
parent78c4a8772526f40c531b5402b56932b0a41e22e8 (diff)
Merge branch 'master' into niels/remove_singleton
Diffstat (limited to 'src/crepe/system/AudioSystem.cpp')
-rw-r--r--src/crepe/system/AudioSystem.cpp5
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;