Ver código fonte

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

Ivan Savenko 1 ano atrás
pai
commit
d7f5d24b99
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      lib/pathfinder/PathfindingRules.cpp

+ 3 - 0
lib/pathfinder/PathfindingRules.cpp

@@ -267,6 +267,9 @@ PathfinderBlockingRule::BlockingReason MovementAfterDestinationRule::getBlocking
 		return BlockingReason::DESTINATION_BLOCKED;
 		return BlockingReason::DESTINATION_BLOCKED;
 
 
 	case EPathNodeAction::BATTLE:
 	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
 		/// Movement after BATTLE action only possible from guarded tile to guardian tile
 		if(destination.guarded)
 		if(destination.guarded)
 		{
 		{