From 239c4504d6fcfe0e78559d1587605a7b5707e5c2 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Nov 2026 22:50:41 +0400 Subject: feat(ai): route capturing robots to building communicators Use the communicator triangles as an explicit approximation to the building approach. Share ownership and distributor transfer with player capture. Single.01 reaches the target XY in terrain routing, with the interior height gap still blocking transfer. The capture check rejects the wrong floor. --- crates/fparkan-runtime/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/fparkan-runtime/src/lib.rs') diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index 5eefdd33..1d8665c3 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -2800,7 +2800,9 @@ pub fn step_headless( if let (Some(combat), Some(unit)) = (&mut engine.autodemo_combat, produced_unit) { combat.activate(&engine.world, unit.object_index, unit.handle); } - if produced_unit.is_some() + let building_captured = clan_ai_events::resolve_captures(engine, queue_time_ms)?; + if building_captured + || produced_unit.is_some() || !autodemo_reinforcements.is_empty() || autodemo_combat_events .iter() -- cgit v1.2.3