From 8751e778767899dcbabb1bb1c0465299d2c48b49 Mon Sep 17 00:00:00 2001 From: LeoDog896 Date: Wed, 30 Sep 2020 11:15:11 -0400 Subject: [PATCH] remove nearGround in favor of !nearLiquid --- core/src/mindustry/ai/Pathfinder.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/ai/Pathfinder.java b/core/src/mindustry/ai/Pathfinder.java index a1aa2cb3af..9cd8fe3729 100644 --- a/core/src/mindustry/ai/Pathfinder.java +++ b/core/src/mindustry/ai/Pathfinder.java @@ -103,15 +103,13 @@ public class Pathfinder implements Runnable{ /** Packs a tile into its internal representation. */ private int packTile(Tile tile){ - //TODO nearGround is just the inverse of nearLiquid? - boolean nearLiquid = false, nearSolid = false, nearGround = false; + boolean nearLiquid = false, nearSolid = false; for(int i = 0; i < 4; i++){ Tile other = tile.getNearby(i); if(other != null){ if(other.floor().isLiquid) nearLiquid = true; if(other.solid()) nearSolid = true; - if(!other.floor().isLiquid) nearGround = true; } } @@ -122,7 +120,7 @@ public class Pathfinder implements Runnable{ tile.floor().isLiquid, tile.staticDarkness() >= 2, nearLiquid, - nearGround, + !nearLiquid, // means its near the ground nearSolid, tile.floor().isDeep(), tile.floor().damageTaken > 0.00001f