summaryrefslogtreecommitdiff
path: root/src/sim/lib/force.rs
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2026-08-23 12:37:54 -0700
committerKai Stevenson <kai@kaistevenson.com>2026-08-23 12:37:54 -0700
commit35f1bc48629456ee66cfb4643ca69b0811f02167 (patch)
tree80e271c7ad5fd074f27b33dcdcdafafc391d2d13 /src/sim/lib/force.rs
parente6742f59102f2beb305b813d7f0ee1d544bbc3e0 (diff)
Revert "separate data from cells"
This reverts commit e6742f59102f2beb305b813d7f0ee1d544bbc3e0.
Diffstat (limited to 'src/sim/lib/force.rs')
-rw-r--r--src/sim/lib/force.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sim/lib/force.rs b/src/sim/lib/force.rs
index fd164f1..e99817c 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},
+ content::materials::{MaterialForm, MaterialId, fire::FireCellView},
sim::{cell::Cell, lib::ray::AwDda, particle_manager::particle::Particle, sim_manager::SimCtx},
};
@@ -34,8 +34,7 @@ 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);
- ctx.cell_manager
- .set_data_from_game_position(ipos.x, ipos.y, 300);
+ fire.set_ticks_lived(300);
fire.match_parity(ctx.cell_manager.seqno);
if cell.material == MaterialId::Void && random_range(0.0..1.0) > 0.5 {