From 6f746b8e31de323a55e2a47d8117faca2aa93a50 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 25 Nov 2026 23:42:11 +0400 Subject: fix(combat): launch AI projectiles from mounted weapon CPTs Resolve weapon node poses and EXTO socket chains on the CPU, replace each mounted component root with its socket, and transform the selected CPT into the world. Test terrain sight lines from each barrel rather than the hull. Share initial Control pose sampling with the window renderer. Count missing mounts and animation fallbacks by original object ID without losing history when an object dies. Checked Control.dll RVA 0x1b4f0 by native invocation, including nonuniform scale and a rotated world matrix. cargo fmt/check/test workspace pass, as do licensed stock AutoDemo and scripted patrol/factory regressions. All 29 stock missions reach --sim-report 900 with no script interruption or weapon pose fallback. Both games were observed in stock AutoDemo windows. AI turret aim, recoil and first-shot chronology remain approximate; this change does not establish full G7 or G8 gameplay parity. --- apps/fparkan-game/src/script_coverage.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/fparkan-game/src/script_coverage.rs') diff --git a/apps/fparkan-game/src/script_coverage.rs b/apps/fparkan-game/src/script_coverage.rs index a01f16fa..a59e8c42 100644 --- a/apps/fparkan-game/src/script_coverage.rs +++ b/apps/fparkan-game/src/script_coverage.rs @@ -21,6 +21,12 @@ pub(super) fn log_script_init(engine: &Engine, mission: &str) { } pub(super) fn log_clan_ai_stops(report: &SimulationReport) { + for ((object, component), (count, reason)) in &report.weapon_poses.fallbacks { + eprintln!("sim_coverage unit_weapon_pose_fallback={count} object={object} component={component} reason={reason}"); + } + for (object, count) in &report.weapon_poses.missing { + eprintln!("sim_coverage unit_weapon_pose_stub={count} object={object}"); + } for &(clan, result, count) in &report.clan_research_scan_queries { eprintln!("sim_coverage script_research_scan_status={count} clan={clan} result={result}"); } -- cgit v1.2.3