mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-25 10:25:42 +07:00
Sector preset shadow fixes
This commit is contained in:
parent
d38abe95f9
commit
fa2df57021
@ -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);
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=bae3e678b96297aed5ca6dbaabcc652da62fa904
|
||||
archash=73139e9d6d21c0fc8200e1231bf30b1d8d3d6800
|
||||
|
Loading…
Reference in New Issue
Block a user