mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
* fix for 0.72d #26 (flying creatures will be blitted over all other creatures, obstacles and wall)
This commit is contained in:
parent
540e15d4ea
commit
22e9098752
@ -1572,13 +1572,17 @@ void CBattleInterface::show(SDL_Surface * to)
|
|||||||
creAnims[stackDeadByHex[b][v]]->nextFrame(to, creAnims[stackDeadByHex[b][v]]->pos.x, creAnims[stackDeadByHex[b][v]]->pos.y, creDir[stackDeadByHex[b][v]], animCount, false); //increment always when moving, never if stack died
|
creAnims[stackDeadByHex[b][v]]->nextFrame(to, creAnims[stackDeadByHex[b][v]]->pos.x, creAnims[stackDeadByHex[b][v]]->pos.y, creDir[stackDeadByHex[b][v]], animCount, false); //increment always when moving, never if stack died
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
std::vector<int> flyingStacks; //flying stacks should be displayed later, over other stacks and obstacles
|
||||||
for(int b=0; b<BFIELD_SIZE; ++b) //showing alive stacks
|
for(int b=0; b<BFIELD_SIZE; ++b) //showing alive stacks
|
||||||
{
|
{
|
||||||
for(size_t v=0; v<stackAliveByHex[b].size(); ++v)
|
for(size_t v=0; v<stackAliveByHex[b].size(); ++v)
|
||||||
{
|
{
|
||||||
int curStackID = stackAliveByHex[b][v];
|
int curStackID = stackAliveByHex[b][v];
|
||||||
|
|
||||||
showAliveStack(stackAliveByHex[b][v], stacks, to);
|
if(!stacks[curStackID].hasFeatureOfType(StackFeature::FLYING) || creAnims[curStackID]->getType() != 0)
|
||||||
|
showAliveStack(curStackID, stacks, to);
|
||||||
|
else
|
||||||
|
flyingStacks.push_back(curStackID);
|
||||||
}
|
}
|
||||||
|
|
||||||
//showing obstacles
|
//showing obstacles
|
||||||
@ -1598,6 +1602,10 @@ void CBattleInterface::show(SDL_Surface * to)
|
|||||||
//showing wall pieces
|
//showing wall pieces
|
||||||
showPieceOfWall(to, b, stacks);
|
showPieceOfWall(to, b, stacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int b=0; b<flyingStacks.size(); ++b) //showing flyign stacks
|
||||||
|
showAliveStack(flyingStacks[b], stacks, to);
|
||||||
|
|
||||||
//units shown
|
//units shown
|
||||||
|
|
||||||
//showing hero animations
|
//showing hero animations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user