diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2026-08-23 12:14:19 -0700 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2026-08-23 12:14:19 -0700 |
| commit | e6742f59102f2beb305b813d7f0ee1d544bbc3e0 (patch) | |
| tree | a4787655e441b4fb7acebf51373a8f3f7afbd9a4 /src/sim/lib/force.rs | |
| parent | 5f137b41ebeadfca3907221713f85f2c9fe431bf (diff) | |
separate data from cells
Diffstat (limited to 'src/sim/lib/force.rs')
| -rw-r--r-- | src/sim/lib/force.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sim/lib/force.rs b/src/sim/lib/force.rs index e99817c..fd164f1 100644 --- a/src/sim/lib/force.rs +++ b/src/sim/lib/force.rs @@ -4,7 +4,7 @@ use rapier2d::{dynamics::RigidBodyHandle, parry::bounding_volume::Aabb, pipeline use crate::{ config::CELLS_TO_METRES, - content::materials::{MaterialForm, MaterialId, fire::FireCellView}, + content::materials::{MaterialForm, MaterialId}, sim::{cell::Cell, lib::ray::AwDda, particle_manager::particle::Particle, sim_manager::SimCtx}, }; @@ -34,7 +34,8 @@ pub fn apply_explosion( let ipos = pos.round().as_ivec2(); if let Some(cell) = ctx.cell_manager.get_cell_from_game_position(ipos.x, ipos.y) { let mut fire = Cell::from_material(MaterialId::Fire); - fire.set_ticks_lived(300); + ctx.cell_manager + .set_data_from_game_position(ipos.x, ipos.y, 300); fire.match_parity(ctx.cell_manager.seqno); if cell.material == MaterialId::Void && random_range(0.0..1.0) > 0.5 { |
