From 3de94a8b9972d5d74a7a6d81cef18de144671b58 Mon Sep 17 00:00:00 2001 From: ArseniyShestakov Date: Thu, 5 Nov 2015 10:22:38 +0300 Subject: [PATCH] CPathfinder: don't allow future movement after guarded tile There is two exceptions: - Hero start movement from guarded tile. - Hero that embarking into boat that standing on guarded tile. In other cases future movement is impossible. --- lib/CPathfinder.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/CPathfinder.cpp b/lib/CPathfinder.cpp index f1ab61629..992c94991 100644 --- a/lib/CPathfinder.cpp +++ b/lib/CPathfinder.cpp @@ -318,8 +318,6 @@ bool CPathfinder::isMovementAfterDestPossible() return true; // For now we'll always allow transit for teleporters if(useEmbarkCost && options.useEmbarkAndDisembark) return true; - if(isDestinationGuarded() && !isSourceGuarded()) - return true; // Can step into a hostile tile once break; case EPathfindingLayer::AIR: