diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 11:16:16 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 11:16:16 +0300 |
| commit | dfbdef7d4d1d295ee962dd8aab754ce6be902f8d (patch) | |
| tree | 9c9f2b6fd6f9519ee05868df3f0d950e00318c24 /crates/fparkan-runtime/src/clan_ai_events.rs | |
| parent | a519d5efefb4d846a9f65c6b9376fa245215a0f6 (diff) | |
| download | fparkan-dfbdef7d4d1d295ee962dd8aab754ce6be902f8d.tar.xz fparkan-dfbdef7d4d1d295ee962dd8aab754ce6be902f8d.zip | |
fix(ai): follow capture passages through building doors
A stock Two Fortresses run now takes the generator after the capturer descends its authored hallway. Symmetric Res17 door links drive the CTLD animation and unsupported routes retain explicit coverage. Checked the approach and descent in the game window with Vulkan validation and verified the owner transfer in a licensed test.
Diffstat (limited to 'crates/fparkan-runtime/src/clan_ai_events.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/clan_ai_events.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/fparkan-runtime/src/clan_ai_events.rs b/crates/fparkan-runtime/src/clan_ai_events.rs index 30ceb573..0ccebdcb 100644 --- a/crates/fparkan-runtime/src/clan_ai_events.rs +++ b/crates/fparkan-runtime/src/clan_ai_events.rs @@ -72,6 +72,9 @@ pub(super) fn resolve_captures( ); } } + if let Some(patrol) = &mut loaded.unit_patrol { + patrol.clear_capture_passage(approach.unit, approach.target); + } loaded.clan_ai_events.capture_orders.remove(index); let clan = usize::from(owner.0); let ai = &mut loaded.clan_ai_events; @@ -810,7 +813,9 @@ impl LoadedMissionState { ); if let Some(approach) = approach { self.clan_ai_events.capture_orders.push((OwnerId(clan as u16), problem.key, approach)); - *self.clan_ai_events.capture_approaches.entry((approach.unit.slot, approach.target.slot)).or_default() += 1; + if approach.fallback { + *self.clan_ai_events.capture_approaches.entry((approach.unit.slot, approach.target.slot)).or_default() += 1; + } } return Ok(Some(VarSetDefault::Dword(u32::from(approach.is_some())))); } |
