aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/factory_release.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-01 08:47:00 +0300
committerValentin Popov <valentin@popov.link>2026-12-01 08:47:00 +0300
commit0224286b0277d63f320f30df8bd2887ac596d207 (patch)
treec0efa6b6ccffe4192eb954ecbc9e671033d9f85a /crates/fparkan-runtime/src/factory_release.rs
parentaf281721b24a4c80d4c640c3d79a293dba2bee61 (diff)
downloadfparkan-0224286b0277d63f320f30df8bd2887ac596d207.tar.xz
fparkan-0224286b0277d63f320f30df8bd2887ac596d207.zip
fix(combat): use building damage stages for projectile contacts
AniMesh resolves the current node stage for its segment query. Select the same variant for projectile contacts in FParkan and verify a ray through the damaged factory roof on stock assets.
Diffstat (limited to 'crates/fparkan-runtime/src/factory_release.rs')
-rw-r--r--crates/fparkan-runtime/src/factory_release.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/fparkan-runtime/src/factory_release.rs b/crates/fparkan-runtime/src/factory_release.rs
index 7a3b724f..93eb0c79 100644
--- a/crates/fparkan-runtime/src/factory_release.rs
+++ b/crates/fparkan-runtime/src/factory_release.rs
@@ -9,6 +9,7 @@ use crate::{
route_traffic::{body_radius, FrameTraffic},
EngineError, LoadedMissionState, ObjectHandle, TransformState, World,
};
+use fparkan_msh::Lod;
use fparkan_terrain::SurfaceQuery;
use fparkan_world::transform_state;
use std::collections::VecDeque;
@@ -81,7 +82,7 @@ pub(super) fn clear_release_position(
plant_index,
plant_pose,
[[x, y, top], [x, y, terrain]],
- |_| true,
+ |_| Some(Lod(0)),
) {
let roof = top + fraction * (terrain - top);
site.exit = Some(site.exit.unwrap_or([site.position[0], site.position[1]]));