From 5c716f658179b3e79ffd40c9497325afc87ba766 Mon Sep 17 00:00:00 2001 From: AlexVinS Date: Tue, 1 Mar 2016 04:41:51 +0300 Subject: [PATCH] Fix hackfix for ghost stack drawing --- client/battle/CBattleInterface.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/battle/CBattleInterface.cpp b/client/battle/CBattleInterface.cpp index 0d478b313..abacebdac 100644 --- a/client/battle/CBattleInterface.cpp +++ b/client/battle/CBattleInterface.cpp @@ -3419,7 +3419,10 @@ BattleObjectsByHex CBattleInterface::sortObjectsByHex() if (stack->position < 0) // turret shooters are handled separately continue; - if(!creAnims[stack->ID]->isDead()) + //FIXME: hack to ignore ghost stacks + if((creAnims[stack->ID]->getType() == CCreatureAnim::DEAD || creAnims[stack->ID]->getType() == CCreatureAnim::HOLDING) && stack->isGhost()) + ;//ignore + else if(!creAnims[stack->ID]->isDead()) { if (!creAnims[stack->ID]->isMoving()) sorted.hex[stack->position].alive.push_back(stack); @@ -3432,8 +3435,7 @@ BattleObjectsByHex CBattleInterface::sortObjectsByHex() sorted.hex[getCurrentPosition(stack)].alive.push_back(stack); } } - //FIXME: hack to ignore ghost stacks - else if(!(creAnims[stack->ID]->getType() == CCreatureAnim::DEAD && stack->isGhost())) + else sorted.hex[stack->position].dead.push_back(stack); }