aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-25 13:58:28 +0300
committerValentin Popov <valentin@popov.link>2026-11-25 13:58:28 +0300
commit44320618ae750da0ab10e50439bf74405b9eacba (patch)
tree9f65aa0cbd8269fe5b49a1d01ed37195f961a233 /apps/fparkan-game
parent7962aa90e3a3b70d6ed5bd5c6a4ad991b3bc0199 (diff)
downloadfparkan-44320618ae750da0ab10e50439bf74405b9eacba.tar.xz
fparkan-44320618ae750da0ab10e50439bf74405b9eacba.zip
feat(ai): queue scripted movement and raid orders
Execute Go, Attack and ShutDown through one ordered queue from Init, Mission and clan AI events. Append preserves the active task; replacement clears its tail. Support the appended point patrol ending mission 19's second raid, and count accepted commands by object and order type. Execute the original ai.dll Handler(15) at RVA 0x8054 with its hash guard: move, attack, shutdown and appended patrol reach the unit without a current problem context, with native insertion modes and missing-unit flag 5. Behavior.dll RVA 0x4280 identifies append and replace paths. Native task completion and profile-dependent behavior remain approximate. Test mixed queues, replacement and deferred patrol; run the licensed mission-19 scenario from its stock start through its first movement. Validate fmt, workspace check/tests, release build and all 29 missions for 900 seconds. Mission 19 has both raid messages and no script stops; mission 29's existing counter/construction stops remain. Check the live stock-start window with normal clocks and Vulkan validation. This does not establish mission completion or native movement/combat parity.
Diffstat (limited to 'apps/fparkan-game')
-rw-r--r--apps/fparkan-game/src/script_coverage.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/fparkan-game/src/script_coverage.rs b/apps/fparkan-game/src/script_coverage.rs
index 968a6280..c7020e73 100644
--- a/apps/fparkan-game/src/script_coverage.rs
+++ b/apps/fparkan-game/src/script_coverage.rs
@@ -21,6 +21,9 @@ pub(super) fn log_script_init(engine: &Engine, mission: &str) {
}
pub(super) fn log_clan_ai_stops(report: &SimulationReport) {
+ for &(unit, order, count) in &report.script_unit_order_counts {
+ eprintln!("sim_coverage script_unit_queue_approx={count} unit={unit} order={order}");
+ }
for &(clan, count) in &report.script_capture_queries {
eprintln!("sim_coverage script_capture_target_approx={count} clan={clan}");
}