Minor blockrenderer cleanup (#6791)

This commit is contained in:
buthed010203
2022-05-08 20:18:02 -04:00
committed by GitHub
parent 668b09e955
commit efee6b9713

View File

@@ -426,7 +426,7 @@ public class BlockRenderer{
updateShadow(build);
renderer.minimap.update(tile);
}
build.visibleFlags |= (1L << player.team().id);
build.visibleFlags |= (1L << pteam.id);
build.wasVisible = true;
}
@@ -436,19 +436,17 @@ public class BlockRenderer{
Draw.z(Layer.block);
}
if(build.team != player.team()){
if(build.team != pteam){
build.drawTeam();
Draw.z(Layer.block);
}
if(build.team == player.team() && renderer.drawStatus && block.hasConsumers){
}else if(renderer.drawStatus && block.hasConsumers){
build.drawStatus();
}
}
Draw.reset();
}else if(!visible){
//TODO here is the question: should buildings you lost sight of remain rendered? if so, how should this information be stored?
//comment lines below for buggy persistence
//uncomment lines below for buggy persistence
//if(build.wasVisible) updateShadow(build);
//build.wasVisible = false;
}