Browse Source

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.
FeniksFire 8 years ago
parent
commit
45a63e003c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      server/CGameHandler.cpp

+ 2 - 1
server/CGameHandler.cpp

@@ -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();
 						}
 					}