mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fix hackfix for ghost stack drawing
This commit is contained in:
@@ -3419,7 +3419,10 @@ BattleObjectsByHex CBattleInterface::sortObjectsByHex()
|
|||||||
if (stack->position < 0) // turret shooters are handled separately
|
if (stack->position < 0) // turret shooters are handled separately
|
||||||
continue;
|
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())
|
if (!creAnims[stack->ID]->isMoving())
|
||||||
sorted.hex[stack->position].alive.push_back(stack);
|
sorted.hex[stack->position].alive.push_back(stack);
|
||||||
@@ -3432,8 +3435,7 @@ BattleObjectsByHex CBattleInterface::sortObjectsByHex()
|
|||||||
sorted.hex[getCurrentPosition(stack)].alive.push_back(stack);
|
sorted.hex[getCurrentPosition(stack)].alive.push_back(stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//FIXME: hack to ignore ghost stacks
|
else
|
||||||
else if(!(creAnims[stack->ID]->getType() == CCreatureAnim::DEAD && stack->isGhost()))
|
|
||||||
sorted.hex[stack->position].dead.push_back(stack);
|
sorted.hex[stack->position].dead.push_back(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user