diff --git a/core/src/mindustry/ai/Pathfinder.java b/core/src/mindustry/ai/Pathfinder.java index 2c950e8636..6e02597128 100644 --- a/core/src/mindustry/ai/Pathfinder.java +++ b/core/src/mindustry/ai/Pathfinder.java @@ -253,7 +253,7 @@ public class Pathfinder implements Runnable{ nearSolid, nearLegSolid, tile.floor().isDeep(), - tile.floor().damageTaken > 0.00001f, + tile.floor().damages(), allDeep, nearDeep, tile.block().teamPassable diff --git a/core/src/mindustry/world/blocks/environment/Floor.java b/core/src/mindustry/world/blocks/environment/Floor.java index 7b9f9ebe3f..f16016f2b2 100644 --- a/core/src/mindustry/world/blocks/environment/Floor.java +++ b/core/src/mindustry/world/blocks/environment/Floor.java @@ -379,6 +379,11 @@ public class Floor extends Block{ return (other.realBlendId(otherTile) > realBlendId(tile) || edges(tile.x, tile.y) == null); } + /** @return whether being on this floor can damage a unit */ + public boolean damages(){ + return damageTaken > 0f || (status != null && status.damage > 0f); + } + public static class UpdateRenderState{ public Tile tile; public Floor floor;