From 68d052ac5c905712442846234aa8dca6cbca11e3 Mon Sep 17 00:00:00 2001 From: Andrii Danylchenko Date: Tue, 6 Sep 2022 19:59:47 +0300 Subject: [PATCH] [844] - fix pathfinding for fly towards guarded tile --- lib/CPathfinder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/CPathfinder.cpp b/lib/CPathfinder.cpp index f1c10ff77..44064ba9c 100644 --- a/lib/CPathfinder.cpp +++ b/lib/CPathfinder.cpp @@ -620,10 +620,11 @@ void LayerTransitionRule::process( destination.blocked = true; } } - else if(source.node->accessible != CGPathNode::ACCESSIBLE && destination.node->accessible != CGPathNode::ACCESSIBLE) + else if(destination.node->accessible != CGPathNode::ACCESSIBLE) { /// Hero that fly can only land on accessible tiles - destination.blocked = true; + if(!destination.isGuardianTile && destination.nodeObject) + destination.blocked = true; } break;