diff --git a/core/src/mindustry/game/FogControl.java b/core/src/mindustry/game/FogControl.java index ca9526cbe8..2be6f8cb9a 100644 --- a/core/src/mindustry/game/FogControl.java +++ b/core/src/mindustry/game/FogControl.java @@ -98,10 +98,10 @@ public final class FogControl implements CustomChunk{ } public boolean isVisibleTile(Team team, int x, int y){ - if(!state.rules.fog) return true; + if(!state.rules.fog || team.isAI()) return true; var data = data(team); - if(data == null) return true; + if(data == null) return false; if(x < 0 || y < 0 || x >= ww || y >= wh) return false; return data.read.get(x + y * ww); } diff --git a/core/src/mindustry/graphics/MinimapRenderer.java b/core/src/mindustry/graphics/MinimapRenderer.java index c388e91ac6..b69e6982f7 100644 --- a/core/src/mindustry/graphics/MinimapRenderer.java +++ b/core/src/mindustry/graphics/MinimapRenderer.java @@ -256,8 +256,8 @@ public class MinimapRenderer{ } private Block realBlock(Tile tile){ - //TODO dynamically update on visibility change; right now it's just entirely hidden - return tile.build == null ? tile.block() : state.rules.fog && tile.build.team != player.team() ? Blocks.air : tile.block(); + //TODO doesn't work properly until player goes and looks at block + return tile.build == null ? tile.block() : state.rules.fog && tile.build.inFogTo(player.team()) ? Blocks.air : tile.block(); } private int colorFor(Tile tile){