aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/projectile.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-26 08:31:05 +0300
committerValentin Popov <valentin@popov.link>2026-11-26 08:31:05 +0300
commit5844c9b0f4216da47cf03894b34f9a150fd5b170 (patch)
tree359612b20341eddd1a0ab27be4e5c7e2c81f0f6a /crates/fparkan-runtime/src/projectile.rs
parentce4fdc768602efe7c621e631c1390d8d76248505 (diff)
downloadfparkan-5844c9b0f4216da47cf03894b34f9a150fd5b170.tar.xz
fparkan-5844c9b0f4216da47cf03894b34f9a150fd5b170.zip
feat(render): hide exhausted chassis geometry
Use provider depletion and the node visibility flag to suppress the projected Vulkan ranges of a failed chassis part. The matching camera fixture shows the heavy warbot losing one track section after a hit while the rest of the hull remains visible.
Diffstat (limited to 'crates/fparkan-runtime/src/projectile.rs')
-rw-r--r--crates/fparkan-runtime/src/projectile.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/projectile.rs b/crates/fparkan-runtime/src/projectile.rs
index e4f098a8..70c9ab77 100644
--- a/crates/fparkan-runtime/src/projectile.rs
+++ b/crates/fparkan-runtime/src/projectile.rs
@@ -460,6 +460,7 @@ mod tests {
);
assert_eq!(amount(&engine, node), 0.0_f32.to_bits());
assert_eq!(amount(&engine, 0), root_before);
+ assert!(crate::depleted_chassis_nodes(&engine).any(|item| item == (14, node as usize)));
assert!(transform_state(&engine.world, target).is_ok());
let effects = take_unit_destruction_effects(&mut engine);
assert_eq!(effects.len(), 1);