From d3b3389a378a3fdc089e728d2252e587a29e2abc Mon Sep 17 00:00:00 2001 From: Arseniy Shestakov Date: Wed, 13 Sep 2017 03:35:58 +0300 Subject: [PATCH] Implement configurable object sounds: ambient, visit and removal * If there more than one sound for visit or removal random is played * At moment only the first ambient sound will be used --- client/CMusicHandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/CMusicHandler.cpp b/client/CMusicHandler.cpp index 948d24de1..36172c295 100644 --- a/client/CMusicHandler.cpp +++ b/client/CMusicHandler.cpp @@ -282,6 +282,7 @@ bool CSoundHandler::ambientCheckVisitable() const void CSoundHandler::ambientUpdateChannels(std::map sounds) { boost::mutex::scoped_lock guard(mutex); + std::vector stoppedSounds; for(auto & pair : ambientChannels) { @@ -312,6 +313,7 @@ void CSoundHandler::ambientUpdateChannels(std::map sounds) void CSoundHandler::ambientStopAllChannels() { boost::mutex::scoped_lock guard(mutex); + for(auto ch : ambientChannels) { ambientStopSound(ch.first);