From acd4c5b109bfa0c089e109160b33104f8596b0c2 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 16:18:27 +0400 Subject: fix(ai): avoid closed hallway links when routing capturers The original GOG ArealMap.dll gate at RVA 0x9cb0 accepts an all-ones mask without a device and rejects zero. Confirmed both returns by a direct DLL call. Filter unsupported links while searching from the communicator, so a shorter closed route cannot shadow an accessible entrance. The stock Two Fortresses 900-second run no longer records capture approach stubs. Its AI takes the mine via the authored gallery, with the ownership change also reproduced in the Vulkan window. Symmetric CTLD door behavior is preserved. --- crates/fparkan-runtime/src/clan_targeting.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/fparkan-runtime/src/clan_targeting.rs') diff --git a/crates/fparkan-runtime/src/clan_targeting.rs b/crates/fparkan-runtime/src/clan_targeting.rs index b98afec0..0555e0fb 100644 --- a/crates/fparkan-runtime/src/clan_targeting.rs +++ b/crates/fparkan-runtime/src/clan_targeting.rs @@ -51,9 +51,9 @@ pub(super) fn send_capturer( let clearance = unit_sphere(assets, unit_id.0 as usize, unit_pose).map_or(0.0, |(_, r)| r); let (destination, point, passage) = if let Some(entrance) = capture_entrance(assets, terrain, index, pose, from, clearance) { - let passage = entrance.legs.map(|legs| CapturePassage { + let passage = Some(CapturePassage { building: unit.target, - legs, + legs: entrance.legs, opening: None, }); (entrance.staging, entrance.capture, passage) -- cgit v1.2.3