فهرست منبع

[844] - fix pathfinding for fly towards guarded tile

Andrii Danylchenko 3 سال پیش
والد
کامیت
a25d0198a9
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      lib/CPathfinder.cpp

+ 3 - 2
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;