aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/unit_combat.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-26 08:24:02 +0300
committerValentin Popov <valentin@popov.link>2026-11-26 08:24:02 +0300
commitce4fdc768602efe7c621e631c1390d8d76248505 (patch)
tree9a5908319ea16bebe3e3bd17c4f23c72edaf89ef /crates/fparkan-runtime/src/unit_combat.rs
parent25f0b76a10dbd5ac2cfabd5354f621ae82cf19b4 (diff)
downloadfparkan-ce4fdc768602efe7c621e631c1390d8d76248505.tar.xz
fparkan-ce4fdc768602efe7c621e631c1390d8d76248505.zip
feat(combat): apply projectile hits to chassis nodes
Use prepared chassis triangles to choose a loaded NDP node. Exhausted ordinary parts play their authored EXPL independently of root death. Unresolved mounted geometry keeps a sphere contact on exit. A stock side-shot fixture exhausts a heavy chassis part while the hull survives.
Diffstat (limited to 'crates/fparkan-runtime/src/unit_combat.rs')
-rw-r--r--crates/fparkan-runtime/src/unit_combat.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/fparkan-runtime/src/unit_combat.rs b/crates/fparkan-runtime/src/unit_combat.rs
index 3cf268ec..eaab747a 100644
--- a/crates/fparkan-runtime/src/unit_combat.rs
+++ b/crates/fparkan-runtime/src/unit_combat.rs
@@ -436,7 +436,7 @@ impl AutoDemoCombat {
});
}
Some(Ok(Some((remaining, false)))) => {
- if let Some(node) = hit.building_node {
+ if let Some(node) = hit.building_node() {
events.push(AutoDemoCombatEvent::BuildingHit {
shooter: flight.shooter,
target: hit.handle,
@@ -453,7 +453,7 @@ impl AutoDemoCombat {
Some(Err(_)) => "damage_error",
};
if self.report.unavailable(flight.shooter_identity, reason, now, 1) {
- eprintln!("unit_combat_contact object={} target={target} target_id={:?} node={:?} result={result:?}", flight.shooter_identity, target.original_id, hit.building_node);
+ eprintln!("unit_combat_contact object={} target={target} target_id={:?} node={:?} result={result:?}", flight.shooter_identity, target.original_id, hit.node);
}
}
}