1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fix: getting additional damage from destination obstacles

When the stack was selected to pass through 2 field in moat, first hex
stopped him but then he got also additional damage from destination
obstacle.
This commit is contained in:
FeniksFire 2017-07-08 17:16:54 +02:00
parent 3634af10ba
commit 45a63e003c

View File

@ -1368,10 +1368,11 @@ int CGameHandler::moveStack(int stack, BattleHex dest)
{
for(auto & i : obs)
{
handleDamageFromObstacle(*i, curStack);
//if stack die in explosion or interrupted by obstacle, abort movement
if(i->stopsMovement() || !curStack->alive())
stackIsMoving = false;
else if(stackIsMoving)
handleDamageFromObstacle(*i, curStack);
i.reset();
}
}