mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-12-22 17:44:00 +07:00
Fixed sector generate producing inconsistent results
This commit is contained in:
parent
30328e61a5
commit
fc5b50822e
@ -93,6 +93,7 @@ public class SectorGenerateDialog extends BaseDialog{
|
||||
var preset = sectorobj.preset;
|
||||
sectorobj.preset = null;
|
||||
|
||||
logic.reset(); //TODO: is this a good idea? all rules and map state are cleared, but it fixes inconsistent gen
|
||||
world.loadSector(sectorobj, seed, false);
|
||||
|
||||
sectorobj.preset = preset;
|
||||
|
@ -209,10 +209,12 @@ public class BaseGenerator{
|
||||
int cx = x - (int)rotator.x;
|
||||
int cy = y - (int)rotator.y;
|
||||
|
||||
for(Stile tile : result.tiles){
|
||||
int realX = tile.x + cx, realY = tile.y + cy;
|
||||
if(!insanity && isTaken(tile.block, realX, realY)){
|
||||
return false;
|
||||
if(!insanity){
|
||||
for(Stile tile : result.tiles){
|
||||
int realX = tile.x + cx, realY = tile.y + cy;
|
||||
if(isTaken(tile.block, realX, realY)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user