diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 08:42:38 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 08:42:38 +0300 |
| commit | 2f75b9792c98c4d32b0349810080dd226357b505 (patch) | |
| tree | a49b82684c095bf2b54523262cdf3edf4b3ce824 /crates/fparkan-runtime/src/unit_combat.rs | |
| parent | 5844c9b0f4216da47cf03894b34f9a150fd5b170 (diff) | |
| download | fparkan-2f75b9792c98c4d32b0349810080dd226357b505.tar.xz fparkan-2f75b9792c98c4d32b0349810080dd226357b505.zip | |
feat(render): throw detached chassis nodes as fragments
Pass the depleted node to an authored Op10 with a built-in mesh request. Reuse its existing draw ranges for the flight and keep the hull alive. The fixed-camera fixture shows the heavy track section separate and rotate after impact.
Diffstat (limited to 'crates/fparkan-runtime/src/unit_combat.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/unit_combat.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/fparkan-runtime/src/unit_combat.rs b/crates/fparkan-runtime/src/unit_combat.rs index eaab747a..593570cf 100644 --- a/crates/fparkan-runtime/src/unit_combat.rs +++ b/crates/fparkan-runtime/src/unit_combat.rs @@ -911,9 +911,8 @@ mod tests { assert!(destruction_effects.iter().any(|event| { event.archive == "system.rlb" && event.name == "explode_rbr_b.exp" - && event.object_index.is_some_and(|index| { - drafts[index].original_id.map(|id| id.0) == retired.original_id - }) + && matches!(event.mesh, Some(crate::DestroyedMesh::Mounted { object_index }) + if drafts[object_index].original_id.map(|id| id.0) == retired.original_id) && event .position .iter() |
