diff options
Diffstat (limited to 'src/sim/lib')
| -rw-r--r-- | src/sim/lib/force.rs | 5 |
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 { |
