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