Fixed map area disable logic

This commit is contained in:
Anuken
2025-04-07 09:53:07 -04:00
parent 6bb031b47f
commit 7bab72df04
2 changed files with 9 additions and 6 deletions
Binary file not shown.
+6 -3
View File
@@ -464,13 +464,16 @@ public class World{
} }
public void checkMapArea(int x, int y, int w, int h){ public void checkMapArea(int x, int y, int w, int h){
for(var build : Groups.build){ for(var team : state.teams.present){
//if the map area contracts, disable the block for(var build : team.buildings){
build.checkAllowUpdate();
//reset map-area-based disabled blocks that were not in the previous map area //reset map-area-based disabled blocks that were not in the previous map area
if(!build.enabled && build.block.autoResetEnabled && !Rect.contains(x, y, w, h, build.tile.x, build.tile.y)){ if(!build.enabled && build.block.autoResetEnabled && !Rect.contains(x, y, w, h, build.tile.x, build.tile.y)){
build.enabled = true; build.enabled = true;
} }
//if the map area contracts, disable the block
build.checkAllowUpdate();
}
} }
} }