From 45a63e003cb4d28190b6a5ce2827e372897dcc29 Mon Sep 17 00:00:00 2001 From: FeniksFire Date: Sat, 8 Jul 2017 17:16:54 +0200 Subject: [PATCH] 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. --- server/CGameHandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 4ff215ce1..0262e0bef 100644 --- a/server/CGameHandler.cpp +++ b/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(); } }