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:
parent
3634af10ba
commit
45a63e003c
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user