From 2bf70f8b1eca48ba40215a4e58aaf6b133d84b18 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 13:39:26 +0400 Subject: fix(player): capture buildings at the communicator floor On the stock Constructor map, walk through the factory basement to the communicator and press Enter. The first objective completes and the same path returns to ground level. The green ceiling no longer hides the floor in the contact query. --- crates/fparkan-runtime/src/mission_events.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'crates/fparkan-runtime/src/mission_events.rs') diff --git a/crates/fparkan-runtime/src/mission_events.rs b/crates/fparkan-runtime/src/mission_events.rs index a198bfdd..ec976224 100644 --- a/crates/fparkan-runtime/src/mission_events.rs +++ b/crates/fparkan-runtime/src/mission_events.rs @@ -624,7 +624,6 @@ pub(super) fn communicator_triangles( pose: super::TransformState, ) -> Option> { let is_generator = class == 0x8000_0002; - let floor_only = is_generator || class == MAIN_TELEPORT_CLASS; let material = if is_generator { &b"B_MTP_07G"[..] } else { @@ -679,15 +678,10 @@ pub(super) fn communicator_triangles( transform.try_transform_scaled_point(pose.transform_point(local), scale) }); let (a, b, c) = (a?, b?, c?); - if floor_only { - // These models use the platform material on both the floor and the surface above it. - let winding = - (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); - if winding <= 0.0 { - return None; - } - } - Some([a, b, c]) + // The floor and ceiling of the communicator share the same material. + let normal_z = + (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); + (normal_z > 0.0).then_some([a, b, c]) }) }) .collect(), -- cgit v1.2.3