From 590c8f39b935f34fc6a4f9c033520c2c0359253d Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 1 Dec 2026 09:27:02 +0400 Subject: fix(ai): prepend base defence attacks to unit orders The native task dispatcher inserts mode 2 at index zero without replacing the old list. Keep the interrupted order and queued tail, then run the base-defence wait after assigning the group in the stock mission. --- crates/fparkan-runtime/src/clan_ai_events.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'crates/fparkan-runtime/src/clan_ai_events.rs') diff --git a/crates/fparkan-runtime/src/clan_ai_events.rs b/crates/fparkan-runtime/src/clan_ai_events.rs index 9f636280..f5dad22f 100644 --- a/crates/fparkan-runtime/src/clan_ai_events.rs +++ b/crates/fparkan-runtime/src/clan_ai_events.rs @@ -969,14 +969,7 @@ impl LoadedMissionState { } ScriptDispatchSelector::Handler(8) if problem.is_some() => { match single_dword(&instruction.references, values) { - Some(1) - if problem - .as_ref() - .is_some_and(|record| matches!(record.key.word_0, OPTIMAL_TRANSPORT | MINE_NEEDED | MAKE_RESEARCH | 6 | BUILDING_PROTECT | PLACE_PROTECT)) - || !conditions.is_empty() => - { - solving = true - } + Some(1) => solving = true, Some(2) => solved = true, _ => { return Err( -- cgit v1.2.3