diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-10 17:53:49 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-10 17:53:49 -0500 |
commit | 2afa279d4c7780e4d43749d73891c9a7d46f4472 (patch) | |
tree | 3454fc185c7f852d0dab917f57d2f59fe5d2283e /src/character_system.cpp | |
parent | 715d97bb52794d2bf2472b820ae64e9d6301b333 (diff) | |
download | tanetane-2afa279d4c7780e4d43749d73891c9a7d46f4472.tar.gz tanetane-2afa279d4c7780e4d43749d73891c9a7d46f4472.tar.bz2 tanetane-2afa279d4c7780e4d43749d73891c9a7d46f4472.zip |
Fixed running sound looping infinitely after running into map change
Diffstat (limited to 'src/character_system.cpp')
-rw-r--r-- | src/character_system.cpp | 8 |
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 | |||
242 | void CharacterSystem::clearSpriteCache() { | ||
243 | for (Sprite& sprite : game_.getSprites() | game_.spriteView()) { | ||
244 | if (sprite.runningSfxChannel != -1) { | ||
245 | stopRunningSound(sprite); | ||
246 | } | ||
247 | } | ||
248 | } | ||