aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/unit_combat.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-26 08:42:38 +0300
committerValentin Popov <valentin@popov.link>2026-11-26 08:42:38 +0300
commit2f75b9792c98c4d32b0349810080dd226357b505 (patch)
treea49b82684c095bf2b54523262cdf3edf4b3ce824 /crates/fparkan-runtime/src/unit_combat.rs
parent5844c9b0f4216da47cf03894b34f9a150fd5b170 (diff)
downloadfparkan-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.rs5
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()