mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-25 22:17:59 +07:00
Fixed world border enable
This commit is contained in:
parent
ab4190a6b5
commit
2cb75d9d88
Binary file not shown.
@ -445,6 +445,15 @@ public class World{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void checkMapArea(){
|
||||
for(var build : Groups.build){
|
||||
//reset map-area-based disabled blocks.
|
||||
if(build.allowUpdate() && !build.enabled){
|
||||
build.enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO optimize; this is very slow and called too often!
|
||||
public float getDarkness(int x, int y){
|
||||
float dark = 0;
|
||||
|
@ -1338,6 +1338,7 @@ public class LExecutor{
|
||||
if(!headless){
|
||||
renderer.updateAllDarkness();
|
||||
}
|
||||
world.checkMapArea();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1351,6 +1352,7 @@ public class LExecutor{
|
||||
state.rules.limitY = y;
|
||||
state.rules.limitWidth = w;
|
||||
state.rules.limitHeight = h;
|
||||
world.checkMapArea();
|
||||
|
||||
if(!headless){
|
||||
renderer.updateAllDarkness();
|
||||
|
Loading…
Reference in New Issue
Block a user