Fix stack reactivation leading to broken spellcasting

This commit is contained in:
Ivan Savenko
2022-11-27 15:10:27 +02:00
parent e76cd1b6a7
commit 15b588b164
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -181,6 +181,7 @@ CBattleInterface::CBattleInterface(const CCreatureSet *army1, const CCreatureSet
{
CCS->musich->playMusicFromSet("battle", true, true);
battleActionsStarted = true;
activateStack();
controlPanel->blockUI(settings["session"]["spectate"].Bool());
battleIntroSoundChannel = -1;
}
@@ -944,7 +945,7 @@ void CBattleInterface::show(SDL_Surface *to)
//activation of next stack, if any
//TODO: should be moved to the very start of this method?
activateStack();
//activateStack();
}
void CBattleInterface::showBattlefieldObjects(std::shared_ptr<CCanvas> canvas, const BattleHex & location )
+1 -1
View File
@@ -390,7 +390,7 @@ void CBattleStacksController::stackActivated(const CStack *stack) //TODO: check
stackToActivate = stack;
owner->waitForAnims();
if (stackToActivate) //during waiting stack may have gotten activated through show
activateStack();
owner->activateStack();
}
void CBattleStacksController::stackRemoved(uint32_t stackID)