From d6664b9b5a9a3aab500b547e4d7448a8bc4ad416 Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Sun, 23 Aug 2026 01:07:07 -0700 Subject: allow entity damage --- src/content/entities/entity_grenade.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/content/entities/entity_grenade.rs') diff --git a/src/content/entities/entity_grenade.rs b/src/content/entities/entity_grenade.rs index c13c239..f6c82e8 100644 --- a/src/content/entities/entity_grenade.rs +++ b/src/content/entities/entity_grenade.rs @@ -15,12 +15,7 @@ struct GrenadeEntityBehaviour { } impl EntityBehaviour for GrenadeEntityBehaviour { - fn update( - &mut self, - update_ctx: &mut EntityUpdateCtx, - ctx: &mut SimCtx, - delta_time: f32, - ) { + fn update(&mut self, update_ctx: &mut EntityUpdateCtx, ctx: &mut SimCtx, delta_time: f32) { self.fuse -= delta_time; if self.fuse <= 0.0 { apply_explosion( @@ -44,7 +39,7 @@ pub fn entity_grenade_def(position: Vec2, fuse: f32) -> EntityDef { for y in 0..h { let cell_idx = x + y * w; raw_cells[cell_idx as usize] = Cell::from_material(MaterialId::Steel); - raw_cells[cell_idx as usize].set_entity(true); + raw_cells[cell_idx as usize].set_entity_integrated(true); } } -- cgit v1.3.1