From defc5f0712734f5decf5b7e174598d256cd6feb3 Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Fri, 21 Aug 2026 23:45:22 -0700 Subject: better explosions --- src/sim/cell/materials/fire.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/sim/cell/materials/fire.rs') diff --git a/src/sim/cell/materials/fire.rs b/src/sim/cell/materials/fire.rs index f582a0c..2a1225e 100644 --- a/src/sim/cell/materials/fire.rs +++ b/src/sim/cell/materials/fire.rs @@ -34,11 +34,11 @@ pub fn sim_update(ctx: &mut UpdateCtx) { // we have a chance to live longer--roughly ?% chance of living an extra second if ctx.rng.random_range(0.0..1.0) > 0.9 { // kill ourselves, with a chance to turn into ash - ctx.do_rewrite = false; if ctx.rng.random_range(0.0..1.0) > 0.8 { // TODO ash material // ctx.set_cell(0, 0, Cell::from_material(MaterialId::Sand)); } else { + ctx.do_rewrite = false; ctx.set_cell(0, 0, Cell::void()); } return; @@ -77,5 +77,4 @@ pub fn sim_update(ctx: &mut UpdateCtx) { } ctx.cell.set_ticks_lived(ticks_lived + 1); - ctx.set_cell(0, 0, *ctx.cell); } -- cgit v1.3.1