Sector preset shadow fixes

This commit is contained in:
Anuken 2020-06-18 14:43:53 -04:00
parent d38abe95f9
commit fa2df57021
2 changed files with 5 additions and 3 deletions

View File

@ -233,6 +233,8 @@ public class World{
}else{
sector.planet.generator.generate(tiles, sector);
}
//just in case
state.rules.sector = sector;
});
//postgenerate for bases
@ -458,13 +460,13 @@ public class World{
float prev = Mathf.round(angle, step);
float next = prev + step;
//raw line length to be translated
float length = tiles.width/2f;
float length = state.getSector().getSize()/2f;
float rawDst = Intersector.distanceLinePoint(Tmp.v1.trns(prev, length), Tmp.v2.trns(next, length), Tmp.v3.set(x - tiles.width/2, y - tiles.height/2).rotate(offset)) / Mathf.sqrt3 - 1;
//noise
rawDst += Noise.noise(x, y, 11f, 7f) + Noise.noise(x, y, 22f, 15f);
int circleDst = (int)(rawDst - (tiles.width / 2 - circleBlend));
int circleDst = (int)(rawDst - (length - circleBlend));
if(circleDst > 0){
dark = Math.max(circleDst / 1f, dark);
}

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=bae3e678b96297aed5ca6dbaabcc652da62fa904
archash=73139e9d6d21c0fc8200e1231bf30b1d8d3d6800