mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
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
This commit is contained in:
parent
20ac1d6880
commit
d3b3389a37
@ -282,6 +282,7 @@ bool CSoundHandler::ambientCheckVisitable() const
|
||||
void CSoundHandler::ambientUpdateChannels(std::map<std::string, int> sounds)
|
||||
{
|
||||
boost::mutex::scoped_lock guard(mutex);
|
||||
|
||||
std::vector<std::string> stoppedSounds;
|
||||
for(auto & pair : ambientChannels)
|
||||
{
|
||||
@ -312,6 +313,7 @@ void CSoundHandler::ambientUpdateChannels(std::map<std::string, int> sounds)
|
||||
void CSoundHandler::ambientStopAllChannels()
|
||||
{
|
||||
boost::mutex::scoped_lock guard(mutex);
|
||||
|
||||
for(auto ch : ambientChannels)
|
||||
{
|
||||
ambientStopSound(ch.first);
|
||||
|
Loading…
Reference in New Issue
Block a user