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

Fixed action cancel on active stack remove

This commit is contained in:
AlexVinS
2015-10-08 08:15:29 +03:00
parent 02c15085be
commit 2677d4a677
4 changed files with 21 additions and 16 deletions

View File

@ -1009,6 +1009,11 @@ void CBattleInterface::stackRemoved(int stackID)
{
if(activeStack->ID == stackID)
{
BattleAction * action = new BattleAction();
action->side = defendingHeroInstance ? (curInt->playerID == defendingHeroInstance->tempOwner) : false;
action->actionType = Battle::CANCEL;
action->stackNumber = activeStack->ID;
givenCommand->setn(action);
setActiveStack(nullptr);
}
}