mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Removed dryness
This commit is contained in:
parent
4735d3d6da
commit
75f5419571
@ -142,7 +142,6 @@ impl<'a> Sampler for ColumnGen<'a> {
|
|||||||
let alt_base = sim.get_interpolated(wpos, |chunk| chunk.alt_base)?;
|
let alt_base = sim.get_interpolated(wpos, |chunk| chunk.alt_base)?;
|
||||||
let chaos = sim.get_interpolated(wpos, |chunk| chunk.chaos)?;
|
let chaos = sim.get_interpolated(wpos, |chunk| chunk.chaos)?;
|
||||||
let temp = sim.get_interpolated(wpos, |chunk| chunk.temp)?;
|
let temp = sim.get_interpolated(wpos, |chunk| chunk.temp)?;
|
||||||
let dryness = sim.get_interpolated(wpos, |chunk| chunk.dryness)?;
|
|
||||||
let humidity = sim.get_interpolated(wpos, |chunk| chunk.humidity)?;
|
let humidity = sim.get_interpolated(wpos, |chunk| chunk.humidity)?;
|
||||||
let rockiness = sim.get_interpolated(wpos, |chunk| chunk.rockiness)?;
|
let rockiness = sim.get_interpolated(wpos, |chunk| chunk.rockiness)?;
|
||||||
let tree_density = sim.get_interpolated(wpos, |chunk| chunk.tree_density)?;
|
let tree_density = sim.get_interpolated(wpos, |chunk| chunk.tree_density)?;
|
||||||
|
@ -491,7 +491,6 @@ pub struct SimChunk {
|
|||||||
pub alt_base: f32,
|
pub alt_base: f32,
|
||||||
pub alt: f32,
|
pub alt: f32,
|
||||||
pub temp: f32,
|
pub temp: f32,
|
||||||
pub dryness: f32,
|
|
||||||
pub humidity: f32,
|
pub humidity: f32,
|
||||||
pub rockiness: f32,
|
pub rockiness: f32,
|
||||||
pub is_cliffs: bool,
|
pub is_cliffs: bool,
|
||||||
@ -521,22 +520,6 @@ impl SimChunk {
|
|||||||
let pos = uniform_idx_as_vec2(posi);
|
let pos = uniform_idx_as_vec2(posi);
|
||||||
let wposf = (pos * TerrainChunkSize::SIZE.map(|e| e as i32)).map(|e| e as f64);
|
let wposf = (pos * TerrainChunkSize::SIZE.map(|e| e as i32)).map(|e| e as f64);
|
||||||
|
|
||||||
// FIXME: Currently unused, but should represent fresh groundwater level.
|
|
||||||
// Should be correlated a little with humidity, somewhat negatively with altitude,
|
|
||||||
// and very negatively with difference in temperature from zero.
|
|
||||||
let dryness = gen_ctx.dry_nz.get(
|
|
||||||
(wposf
|
|
||||||
.add(Vec2::new(
|
|
||||||
gen_ctx
|
|
||||||
.dry_nz
|
|
||||||
.get((wposf.add(10000.0).div(500.0)).into_array())
|
|
||||||
* 150.0,
|
|
||||||
gen_ctx.dry_nz.get((wposf.add(0.0).div(500.0)).into_array()) * 150.0,
|
|
||||||
))
|
|
||||||
.div(2_000.0))
|
|
||||||
.into_array(),
|
|
||||||
) as f32;
|
|
||||||
|
|
||||||
let (_, alt_base) = gen_cdf.alt_base[posi];
|
let (_, alt_base) = gen_cdf.alt_base[posi];
|
||||||
let map_edge_factor = map_edge_factor(posi);
|
let map_edge_factor = map_edge_factor(posi);
|
||||||
let (_, chaos) = gen_cdf.chaos[posi];
|
let (_, chaos) = gen_cdf.chaos[posi];
|
||||||
@ -606,16 +589,12 @@ impl SimChunk {
|
|||||||
alt_base,
|
alt_base,
|
||||||
alt,
|
alt,
|
||||||
temp,
|
temp,
|
||||||
dryness,
|
|
||||||
humidity,
|
humidity,
|
||||||
rockiness: (gen_ctx.rock_nz.get((wposf.div(1024.0)).into_array()) as f32)
|
rockiness: (gen_ctx.rock_nz.get((wposf.div(1024.0)).into_array()) as f32)
|
||||||
.sub(0.1)
|
.sub(0.1)
|
||||||
.mul(1.3)
|
.mul(1.3)
|
||||||
.max(0.0),
|
.max(0.0),
|
||||||
is_cliffs: cliff > 0.5
|
is_cliffs: cliff > 0.5 && alt > CONFIG.sea_level + 5.0,
|
||||||
&& dryness > 0.05
|
|
||||||
&& alt > CONFIG.sea_level + 5.0
|
|
||||||
&& dryness.abs() > 0.075,
|
|
||||||
near_cliffs: cliff > 0.25,
|
near_cliffs: cliff > 0.25,
|
||||||
tree_density,
|
tree_density,
|
||||||
forest_kind: if temp > 0.0 {
|
forest_kind: if temp > 0.0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user