From a7a9a99780c4f7ad61f1f1777952344f1c6042c7 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 21 Apr 2024 10:19:39 -0400 Subject: [PATCH] More pathfinder tweaks --- core/src/mindustry/ai/ControlPathfinder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/ai/ControlPathfinder.java b/core/src/mindustry/ai/ControlPathfinder.java index cdc35db17f..01cfb849df 100644 --- a/core/src/mindustry/ai/ControlPathfinder.java +++ b/core/src/mindustry/ai/ControlPathfinder.java @@ -1367,7 +1367,9 @@ public class ControlPathfinder implements Runnable{ private static boolean nearPassable(int team, PathCost cost, int pos){ int amount = cost.getCost(team, pathfinder.tiles[pos]); - return amount != impassable && amount < 50; + //for standard units: never consider deep water (cost = 6000) passable + //for leg units: consider it passable + return amount != impassable && amount < (cost == costLegs ? solidCap : 50); } private static boolean solid(int team, PathCost type, int x, int y){