mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Crazy cliffs
This commit is contained in:
parent
414b730b59
commit
7f5a0970f1
@ -66,7 +66,21 @@ impl<'a> Sampler for BlockGen<'a> {
|
||||
.mul((chaos - 0.1).max(0.0))
|
||||
.mul(90.0);
|
||||
|
||||
let height = alt + warp;
|
||||
let cliff = (self.world.sim()
|
||||
.gen_ctx
|
||||
.warp_nz
|
||||
.get((wposf.div(Vec3::new(150.0, 150.0, 150.0))).into_array())
|
||||
as f32)
|
||||
//.add(0.6)
|
||||
.mul(130.0);
|
||||
|
||||
let is_cliff = (self.world.sim()
|
||||
.gen_ctx
|
||||
.warp_nz
|
||||
.get((wposf.div(Vec3::new(100.0, 100.0, 100.0))).into_array())
|
||||
as f32) > 0.0;//4;
|
||||
|
||||
let height = alt + warp + if is_cliff { cliff } else { 0.0 };
|
||||
|
||||
// Sample blocks
|
||||
|
||||
|
@ -140,7 +140,7 @@ impl WorldSim {
|
||||
}
|
||||
}
|
||||
|
||||
const Z_TOLERANCE: (f32, f32) = (128.0, 64.0);
|
||||
const Z_TOLERANCE: (f32, f32) = (128.0, 128.0);
|
||||
|
||||
pub struct SimChunk {
|
||||
pub chaos: f32,
|
||||
@ -179,7 +179,7 @@ impl SimChunk {
|
||||
let alt_base = alt_base
|
||||
.mul(0.4)
|
||||
.add(alt_base.mul(128.0).sin().mul(0.005))
|
||||
.mul(800.0);
|
||||
.mul(400.0);
|
||||
|
||||
let alt_main = (gen_ctx.alt_nz.get((wposf.div(1_000.0)).into_array()) as f32)
|
||||
.abs()
|
||||
|
Loading…
Reference in New Issue
Block a user