2
0
Эх сурвалжийг харах

If original movement rules are on, it is not possible to attack guards
from visitable object directly

Ivan Savenko 1 жил өмнө
parent
commit
d7f5d24b99

+ 3 - 0
lib/pathfinder/PathfindingRules.cpp

@@ -267,6 +267,9 @@ PathfinderBlockingRule::BlockingReason MovementAfterDestinationRule::getBlocking
 		return BlockingReason::DESTINATION_BLOCKED;
 
 	case EPathNodeAction::BATTLE:
+		if (config->options.originalFlyRules && destination.nodeObject && source.node->layer == EPathfindingLayer::AIR)
+			return BlockingReason::DESTINATION_BLOCKED;
+
 		/// Movement after BATTLE action only possible from guarded tile to guardian tile
 		if(destination.guarded)
 		{