From 5e37697f0cb2f8c168df10fd2128d216cf376e69 Mon Sep 17 00:00:00 2001 From: Isse Date: Tue, 23 Jan 2024 23:20:10 +0100 Subject: [PATCH] add comment about lightning --- server/src/weather/tick.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/weather/tick.rs b/server/src/weather/tick.rs index a070d77e9a..625f35d24a 100644 --- a/server/src/weather/tick.rs +++ b/server/src/weather/tick.rs @@ -149,9 +149,11 @@ impl<'a> System<'a> for Sys { } } + // Chance to emit lightning every frame from one or more of the cells that + // currently has the correct weather conditions. let mut outcome_emitter = outcomes.emitter(); let mut rng = thread_rng(); - let num_cells = lightning_cells.cells.len() as f64 * 0.002 * delta_time.0 as f64; + let num_cells = lightning_cells.cells.len() as f64 * 0.0015 * delta_time.0 as f64; let num_cells = num_cells.floor() as u32 + rng.gen_bool(num_cells.fract()) as u32; for _ in 0..num_cells {