diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-14 21:50:41 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-14 21:50:41 +0300 |
| commit | 239c4504d6fcfe0e78559d1587605a7b5707e5c2 (patch) | |
| tree | 496e315f11ab25d484490e4abb14d6adeefab801 /crates/fparkan-runtime/src/lib.rs | |
| parent | 04ac1b927abde1e5e448718f94834de83a01fff8 (diff) | |
| download | fparkan-239c4504d6fcfe0e78559d1587605a7b5707e5c2.tar.xz fparkan-239c4504d6fcfe0e78559d1587605a7b5707e5c2.zip | |
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.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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() |
