Bugfixes
This commit is contained in:
@@ -11,6 +11,7 @@ import mindustry.world.*;
|
||||
public abstract class PlanetGenerator extends BasicGenerator implements HexMesher{
|
||||
protected IntSeq ints = new IntSeq();
|
||||
protected Sector sector;
|
||||
protected Simplex noise = new Simplex();
|
||||
|
||||
/** Should generate sector bases for a planet. */
|
||||
public void generateSector(Sector sector){
|
||||
@@ -46,6 +47,12 @@ public abstract class PlanetGenerator extends BasicGenerator implements HexMeshe
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float noise(float x, float y, double octaves, double falloff, double scl, double mag){
|
||||
Vec3 v = sector.rect.project(x, y);
|
||||
return (float)noise.octaveNoise3D(octaves, falloff, 1f / scl, v.x, v.y, v.z) * (float)mag;
|
||||
}
|
||||
|
||||
public void generate(Tiles tiles, Sector sec){
|
||||
this.tiles = tiles;
|
||||
this.sector = sec;
|
||||
|
||||
@@ -16,7 +16,6 @@ import mindustry.world.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class SerpuloPlanetGenerator extends PlanetGenerator{
|
||||
Simplex noise = new Simplex();
|
||||
RidgedPerlin rid = new RidgedPerlin(1, 2);
|
||||
BaseGenerator basegen = new BaseGenerator();
|
||||
float scl = 5f;
|
||||
|
||||
Reference in New Issue
Block a user