Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
Conflicts: core/src/mindustry/graphics/g3d/PlanetRenderer.java
This commit is contained in:
@@ -19,7 +19,7 @@ import mindustry.world.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class WaveSpawner{
|
||||
private static final float margin = 40f, coreMargin = tilesize * 2f, maxSteps = 30;
|
||||
private static final float margin = 0f, coreMargin = tilesize * 2f, maxSteps = 30;
|
||||
|
||||
private int tmpCount;
|
||||
private Seq<Tile> spawns = new Seq<>();
|
||||
|
||||
@@ -462,7 +462,7 @@ public class Fx{
|
||||
color(Pal.lightFlame, Pal.darkFlame, e.fin());
|
||||
stroke(0.5f + e.fout());
|
||||
|
||||
randLenVectors(e.id, 2, e.fin() * 15f, e.rotation, 50f, (x, y) -> {
|
||||
randLenVectors(e.id, 2, 1f + e.fin() * 15f, e.rotation, 50f, (x, y) -> {
|
||||
float ang = Mathf.angle(x, y);
|
||||
lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f);
|
||||
});
|
||||
@@ -472,7 +472,7 @@ public class Fx{
|
||||
color(Color.white, Pal.heal, e.fin());
|
||||
stroke(0.5f + e.fout());
|
||||
|
||||
randLenVectors(e.id, 2, e.fin() * 15f, e.rotation, 50f, (x, y) -> {
|
||||
randLenVectors(e.id, 2, 1f + e.fin() * 15f, e.rotation, 50f, (x, y) -> {
|
||||
float ang = Mathf.angle(x, y);
|
||||
lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f);
|
||||
});
|
||||
@@ -481,7 +481,7 @@ public class Fx{
|
||||
hitLiquid = new Effect(16, e -> {
|
||||
color(e.color);
|
||||
|
||||
randLenVectors(e.id, 5, e.fin() * 15f, e.rotation, 60f, (x, y) -> {
|
||||
randLenVectors(e.id, 5, 1f + e.fin() * 15f, e.rotation, 60f, (x, y) -> {
|
||||
Fill.circle(e.x + x, e.y + y, e.fout() * 2f);
|
||||
});
|
||||
}),
|
||||
|
||||
@@ -18,6 +18,8 @@ import mindustry.world.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class SerpuloPlanetGenerator extends PlanetGenerator{
|
||||
//alternate, less direct generation (wip)
|
||||
public static boolean alt = false;
|
||||
static final int seed = 0;
|
||||
|
||||
BaseGenerator basegen = new BaseGenerator();
|
||||
@@ -175,8 +177,12 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
||||
Vec2 midpoint = Tmp.v1.set(to.x, to.y).add(x, y).scl(0.5f);
|
||||
rand.nextFloat();
|
||||
|
||||
//add randomized offset to avoid straight lines
|
||||
midpoint.add(Tmp.v2.setToRandomDirection(rand).scl(Tmp.v1.dst(x, y)));
|
||||
if(alt){
|
||||
midpoint.add(Tmp.v2.set(1, 0f).setAngle(Angles.angle(to.x, to.y, x, y) + 90f * (rand.chance(0.5) ? 1f : -1f)).scl(Tmp.v1.dst(x, y) * 2f));
|
||||
}else{
|
||||
//add randomized offset to avoid straight lines
|
||||
midpoint.add(Tmp.v2.setToRandomDirection(rand).scl(Tmp.v1.dst(x, y)));
|
||||
}
|
||||
|
||||
midpoint.sub(width/2f, height/2f).limit(width / 2f / Mathf.sqrt3).add(width/2f, height/2f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user