From 95e4be7186e7b65f20839d6699554840b3447438 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 17 Apr 2024 22:46:07 -0400 Subject: [PATCH] comments --- core/src/mindustry/ai/HierarchyPathFinder.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/core/src/mindustry/ai/HierarchyPathFinder.java b/core/src/mindustry/ai/HierarchyPathFinder.java index dce60a10a4..de066116b8 100644 --- a/core/src/mindustry/ai/HierarchyPathFinder.java +++ b/core/src/mindustry/ai/HierarchyPathFinder.java @@ -1086,16 +1086,6 @@ public class HierarchyPathFinder implements Runnable{ anyNearSolid = true; } - //check for corner preventing movement - //if((checkCorner(unit, tileOn, other, dir - 1) || checkCorner(unit, tileOn, other, dir + 1)) && - // (checkSolid(unit, tileOn, dir - 2) || checkSolid(unit, tileOn, dir + 2))){ //there must be a tile to the left or right to keep the unit from going back and forth forever - - //recalc = true; - //keep moving even if it's blocked - //any = true; - // continue; - //} - if((value == 0 || otherCost < value) && otherCost != impassable && (otherCost != 0 || packed == destPos) && (current == null || otherCost < minCost) && passable(unit.team.id, cost, packed) && //diagonal corner trap !( @@ -1109,6 +1099,7 @@ public class HierarchyPathFinder implements Runnable{ } //TODO raycast spam = extremely slow + //...flowfield integration spam is also really slow. if(!(current == null || (costId == costGround && current.dangerous() && !tileOn.dangerous()))){ //when anyNearSolid is false, no solid tiles have been encountered anywhere so far, so raycasting is a waste of time