1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Fix UI on battle start if hero has tactics

This commit is contained in:
Ivan Savenko 2022-12-21 20:01:50 +02:00
parent b423b3fa6b
commit 8a9a7b9650

View File

@ -97,18 +97,18 @@ BattleInterface::BattleInterface(const CCreatureSet *army1, const CCreatureSet *
effectsController.reset(new BattleEffectsController(*this));
obstacleController.reset(new BattleObstacleController(*this));
if(tacticsMode)
tacticNextStack(nullptr);
CCS->musich->stopMusic();
setAnimationCondition(EAnimationEvents::OPENING, true);
battleIntroSoundChannel = CCS->soundh->playSoundFromSet(CCS->soundh->battleIntroSounds);
auto onIntroPlayed = [&]()
auto onIntroPlayed = [this]()
{
if(LOCPLINT->battleInt)
{
boost::unique_lock<boost::recursive_mutex> un(*CPlayerInterface::pim);
CCS->musich->playMusicFromSet("battle", true, true);
setAnimationCondition(EAnimationEvents::OPENING, false);
if(tacticsMode)
tacticNextStack(nullptr);
activateStack();
battleIntroSoundChannel = -1;
}
@ -549,6 +549,7 @@ void BattleInterface::activateStack()
myTurn = true;
windowObject->updateQueue();
windowObject->blockUI(false);
fieldController->redrawBackgroundWithHexes();
actionsController->activateStack();
GH.fakeMouseMove();