Fog building view fix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user