summary refs log tree commit diff stats
path: root/src/character_system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/character_system.cpp')
-rw-r--r--src/character_system.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/character_system.cpp b/src/character_system.cpp index d4765bf..888914f 100644 --- a/src/character_system.cpp +++ b/src/character_system.cpp
@@ -238,3 +238,11 @@ void CharacterSystem::stopRunningSound(Sprite& sprite) {
238 sprite.runningSfxChannel = -1; 238 sprite.runningSfxChannel = -1;
239 } 239 }
240} 240}
241
242void CharacterSystem::clearSpriteCache() {
243 for (Sprite& sprite : game_.getSprites() | game_.spriteView()) {
244 if (sprite.runningSfxChannel != -1) {
245 stopRunningSound(sprite);
246 }
247 }
248}