mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Visual fix - destroy shooters together with tower
This commit is contained in:
parent
e68a2e7ef5
commit
fb9ee9ddf7
@ -4340,6 +4340,7 @@ bool CGameHandler::makeBattleAction(BattleAction &ba)
|
||||
attack.attackedPart = attackedPart;
|
||||
attack.destinationTile = destination;
|
||||
attack.damageDealt = 0;
|
||||
BattleUnitsChanged removeUnits;
|
||||
|
||||
int dmgChance[] = { stackBallisticsParameters.noDmg, stackBallisticsParameters.oneDmg, stackBallisticsParameters.twoDmg }; //dmgChance[i] - chance for doing i dmg when hit is successful
|
||||
|
||||
@ -4379,7 +4380,6 @@ bool CGameHandler::makeBattleAction(BattleAction &ba)
|
||||
break;
|
||||
}
|
||||
|
||||
BattleUnitsChanged removeUnits;
|
||||
for(auto & elem : gs->curB->stacks)
|
||||
{
|
||||
if(elem->initialPosition == posRemove)
|
||||
@ -4388,13 +4388,14 @@ bool CGameHandler::makeBattleAction(BattleAction &ba)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!removeUnits.changedStacks.empty())
|
||||
sendAndApply(&removeUnits);
|
||||
}
|
||||
ca.attacker = ba.stackNumber;
|
||||
ca.attackedParts.push_back(attack);
|
||||
|
||||
sendAndApply(&ca);
|
||||
|
||||
if(!removeUnits.changedStacks.empty())
|
||||
sendAndApply(&removeUnits);
|
||||
}
|
||||
//finish by scope guard
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user