From 3f14308af536f4ad04c004f02f5ed799c5ae443c Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Nov 2026 11:16:24 +0400 Subject: feat(runtime): board and drive allied warbots --- crates/fparkan-runtime/src/projectile.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/fparkan-runtime/src/projectile.rs') diff --git a/crates/fparkan-runtime/src/projectile.rs b/crates/fparkan-runtime/src/projectile.rs index d88eed50..af9e075e 100644 --- a/crates/fparkan-runtime/src/projectile.rs +++ b/crates/fparkan-runtime/src/projectile.rs @@ -178,6 +178,7 @@ pub fn projectile_unit_hit( segment: [[f32; 3]; 2], ) -> Option { let mission = engine.loaded.as_ref()?; + let passenger = mission.boarding.map(|boarding| boarding.hero.handle); // shortcut: root MSH sphere until combat uses the per-node hull query. mission .object_drafts @@ -189,7 +190,7 @@ pub fn projectile_unit_hit( return None; } let handle = handle_by_original_id(&engine.world, draft.original_id?)?; - if handle == shooter { + if handle == shooter || passenger == Some(handle) { return None; } let state = transform_state(&engine.world, handle).ok()?; -- cgit v1.2.3