From fa2df57021750ebbb20db30e667efee391c68edf Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 18 Jun 2020 14:43:53 -0400 Subject: [PATCH] Sector preset shadow fixes --- core/src/mindustry/core/World.java | 6 ++++-- gradle.properties | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/core/World.java b/core/src/mindustry/core/World.java index f1bd49ce2b..78c06d6ff9 100644 --- a/core/src/mindustry/core/World.java +++ b/core/src/mindustry/core/World.java @@ -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); } diff --git a/gradle.properties b/gradle.properties index a4bf351bc2..3dfc690f4c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=bae3e678b96297aed5ca6dbaabcc652da62fa904 +archash=73139e9d6d21c0fc8200e1231bf30b1d8d3d6800