Fixed map area disable logic
This commit is contained in:
Binary file not shown.
@@ -464,12 +464,15 @@ 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user