1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Restored ambient sounds functionality

This commit is contained in:
Ivan Savenko
2023-03-01 17:20:05 +02:00
parent cdcd5a29dd
commit b57a07b10f
18 changed files with 361 additions and 133 deletions

View File

@ -1188,11 +1188,13 @@ CCastleInterface::CCastleInterface(const CGTownInstance * Town, const CGTownInst
townlist->onSelect = std::bind(&CCastleInterface::townChange, this);
recreateIcons();
adventureInt->onAudioPaused();
CCS->musich->playMusic(town->town->clientInfo.musicTheme, true, false);
}
CCastleInterface::~CCastleInterface()
{
adventureInt->onAudioResumed();
if(LOCPLINT->castleInt == this)
LOCPLINT->castleInt = nullptr;
}