diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 06:10:46 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 06:10:46 +0300 |
| commit | 8f1ba615bf1e393698eae7624073c1ad9f54c02b (patch) | |
| tree | 2f3792c5070d4253472ee24d45d2d3dad3813e76 /crates/fparkan-runtime/src/projectile.rs | |
| parent | 3dd13b710e1e559ef3f5cf15f3c6b50e8377d161 (diff) | |
| download | fparkan-8f1ba615bf1e393698eae7624073c1ad9f54c02b.tar.xz fparkan-8f1ba615bf1e393698eae7624073c1ad9f54c02b.zip | |
feat(combat): play the referenced explosion on chassis destruction
Read the version-one EXPL reference from the depleted NDP root. Retain the death position across slot reuse and show the authored billboard, light and sound after the mesh is removed.
Verified the explosion sprite after a stock AutoDemo kill, with Vulkan validation clean. Node detachment, debris particles and building destruction remain open.
Diffstat (limited to 'crates/fparkan-runtime/src/projectile.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/projectile.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/projectile.rs b/crates/fparkan-runtime/src/projectile.rs index 15ffce85..2ad708eb 100644 --- a/crates/fparkan-runtime/src/projectile.rs +++ b/crates/fparkan-runtime/src/projectile.rs @@ -379,7 +379,11 @@ pub fn apply_projectile_hit( // shortcut: use the projectile provider volume directly, with immediate // removal on root depletion until native damage and death timing are wired. if volume >= remaining { + let effect = super::destruction::pending_effect(engine, handle); request_delete(&mut engine.world, handle).map_err(ControlResourceAccessError::World)?; + if let (Some(effect), Some(events)) = (effect, engine.destruction_effects.as_mut()) { + events.push(effect); + } return Ok(Some((0.0, true))); } apply_loaded_mission_control_node_delta(engine, handle, 0, -volume)?; |
