From 3837bebc873a32914139e8987a34716008da716c Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 06:28:08 +0400 Subject: feat(combat): render authored trails for autonomous projectiles Send simulated flight segments, clipped at their first contact, to the shared projectile trail renderer. A final trail can be presented after its projectile body is removed. The existing render pool serves both paths independently. Verified three prepared trail families and a visible laser segment from a stock AutoDemo start with Vulkan validation clean. Stock combat tests retain contact and weapon identities. --- crates/fparkan-runtime/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crates/fparkan-runtime/src/lib.rs') diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index 627714ba..53a41112 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -3364,6 +3364,16 @@ pub fn autodemo_projectiles( .flat_map(unit_combat::AutoDemoCombat::flights) } +/// Travel during the latest combat step, including segments ending on impact. +pub fn autonomous_projectile_segments( + engine: &Engine, +) -> impl Iterator + '_ { + engine + .autodemo_combat + .iter() + .flat_map(unit_combat::AutoDemoCombat::segments) +} + /// Counts autonomous weapons or projectile profiles that could not be prepared. #[must_use] pub fn autodemo_combat_unavailable(engine: &Engine) -> usize { -- cgit v1.2.3