diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-14 10:16:24 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-14 10:16:24 +0300 |
| commit | 3f14308af536f4ad04c004f02f5ed799c5ae443c (patch) | |
| tree | b196d8814ee9b23e69cc96811d0538d8748b8a75 /crates/fparkan-runtime/src/projectile.rs | |
| parent | e8e55549d6bd984a01c09eb49882bf3f70090633 (diff) | |
| download | fparkan-3f14308af536f4ad04c004f02f5ed799c5ae443c.tar.xz fparkan-3f14308af536f4ad04c004f02f5ed799c5ae443c.zip | |
feat(runtime): board and drive allied warbots
Diffstat (limited to 'crates/fparkan-runtime/src/projectile.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/projectile.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<ProjectileContact> { 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()?; |
