diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 05:28:08 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 05:28:08 +0300 |
| commit | 3837bebc873a32914139e8987a34716008da716c (patch) | |
| tree | 73c8cf87b62152721baa77282445c354c0318f8c /crates/fparkan-runtime/src/lib.rs | |
| parent | fbaf44e97a413e1705b1dfb011849e19d4b21fa5 (diff) | |
| download | fparkan-3837bebc873a32914139e8987a34716008da716c.tar.xz fparkan-3837bebc873a32914139e8987a34716008da716c.zip | |
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.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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<Item = (usize, [[f32; 3]; 2])> + '_ { + 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 { |
