mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
reasonable delta time
This commit is contained in:
parent
547301ff5f
commit
0c804af773
@ -24,11 +24,11 @@ pub fn init(state: &mut State, world: &world::World) {
|
||||
state
|
||||
.ecs_mut()
|
||||
.insert(SysScheduler::<tick::Sys>::every(Duration::from_secs_f32(
|
||||
sim::DT / 100.0,
|
||||
sim::DT,
|
||||
)));
|
||||
state
|
||||
.ecs_mut()
|
||||
.insert(SysScheduler::<sync::Sys>::every(Duration::from_secs_f32(
|
||||
sim::DT / 100.0,
|
||||
sim::DT,
|
||||
)));
|
||||
}
|
||||
|
@ -30,24 +30,6 @@ struct Cell {
|
||||
}
|
||||
/// Used to sample weather that isn't simulated
|
||||
fn sample_cell(p: Vec2<i32>, time: f64) -> Cell {
|
||||
/*let noise = FastNoise::new(0b10110_101_1100_1111_10010_101_1110);
|
||||
// Feeding sensible values into the simulation
|
||||
Cell {
|
||||
wind: Vec2::new(
|
||||
noise.get(p.as_().with_z(time / 1000.0)),
|
||||
noise.get(p.as_().with_z(-time / 1000.0)),
|
||||
) * ((noise.get(p.as_().with_z(time / 1000.0 + 200.0)) + 1.0) * 0.5).powf(2.0)
|
||||
* 30.0
|
||||
+ 5.0,
|
||||
temperature: noise.get(p.as_().with_z(time / 1000.0 + 300.0)).powf(3.0) * 10.0
|
||||
+ BASE_TEMPERATURE
|
||||
+ 273.3, /* 10 -> 30 C */
|
||||
moisture: BASE_MOISTURE + noise.get(p.as_().with_z(time / 100.0 + 400.0)).powf(3.0) * 0.2,
|
||||
cloud: noise
|
||||
.get((p.as_() / 2.0).with_z(time / 100.0 + 400.0))
|
||||
.powf(2.0)
|
||||
* 1.0,
|
||||
} */
|
||||
Cell {
|
||||
wind: Vec2::new(10.0, 0.0),
|
||||
temperature: 20.0,
|
||||
|
Loading…
Reference in New Issue
Block a user