From 4380928861c2a43f0d0b9793b9e501c720cf5803 Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Sat, 22 Aug 2026 17:59:19 -0700 Subject: default impl for behaviour trait --- src/sim/entity/entities/entity_grenade.rs | 7 ------- src/sim/entity/mod.rs | 12 +++++++++--- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src/sim/entity') diff --git a/src/sim/entity/entities/entity_grenade.rs b/src/sim/entity/entities/entity_grenade.rs index eead416..abc57d9 100644 --- a/src/sim/entity/entities/entity_grenade.rs +++ b/src/sim/entity/entities/entity_grenade.rs @@ -11,13 +11,6 @@ struct GrenadeEntityBehaviour { } impl EntityBehaviour for GrenadeEntityBehaviour { - fn physics_update( - &mut self, - _update_ctx: &mut EntityUpdateCtx, - _ctx: &mut SimCtx, - _delta_time: f32, - ) -> () { - } fn update( &mut self, update_ctx: &mut EntityUpdateCtx, diff --git a/src/sim/entity/mod.rs b/src/sim/entity/mod.rs index c6c350e..555d2c6 100644 --- a/src/sim/entity/mod.rs +++ b/src/sim/entity/mod.rs @@ -46,14 +46,20 @@ impl Marchable for EntityCells { } pub trait EntityBehaviour { - 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, + ) -> () { + } fn physics_update( &mut self, update_ctx: &mut EntityUpdateCtx, ctx: &mut SimCtx, delta_time: f32, - ) -> (); + ) -> () { + } } pub struct EntityDef { -- cgit v1.3.1