1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Fix commander appearing in battles while dead

This commit is contained in:
dydzio
2016-10-02 16:25:20 +02:00
parent 95ee76977f
commit 02e795d508
2 changed files with 2 additions and 2 deletions

View File

@ -499,7 +499,7 @@ BattleInfo * BattleInfo::setupBattle( int3 tile, ETerrainType terrain, BFieldTyp
//adding commanders
for (int i = 0; i < 2; ++i)
{
if (heroes[i] && heroes[i]->commander)
if (heroes[i] && heroes[i]->commander && heroes[i]->commander->alive)
{
CStack * stack = curB->generateNewStack (*heroes[i]->commander, !i, SlotID::COMMANDER_SLOT_PLACEHOLDER,
creatureBank ? commanderBank[i] : commanderField[i]);