From 2de3fd6567d6eee36910af260f1e5767213ba89c Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 1 Dec 2026 16:26:55 +0400 Subject: fix(combat): converge manual shots on the authored sight ray Read the ray origin and axis from the turret CTL rows. Match the Control sight query and its minimum convergence distance for compatible projectile profiles. Free look keeps using the same turret ray. Checked Control.dll RVA 0x2a610 with near, far, and clear rays. Used the stock firing range window for the changed launch vectors and replayed ordinary player inputs from the normal start through victory. --- crates/fparkan-runtime/src/projectile.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/fparkan-runtime/src/projectile.rs') diff --git a/crates/fparkan-runtime/src/projectile.rs b/crates/fparkan-runtime/src/projectile.rs index 720aad08..5681ad4f 100644 --- a/crates/fparkan-runtime/src/projectile.rs +++ b/crates/fparkan-runtime/src/projectile.rs @@ -25,6 +25,8 @@ pub struct ProjectileAssets { pub lifetime_ms: u32, /// Initial provider volume of the projectile. pub volume: Option, + /// Whether the BULL profile permits bringing the shot onto the sight ray. + pub sight_convergence: bool, pub(super) autonomous_fire_distance: f32, } @@ -75,6 +77,8 @@ pub(super) fn load_projectile( }; let speed = f32::from_bits(control.native_profile_words[7]); let lifetime_ms = control.native_profile_words[18]; + // Control+0x297b1 forces a nonzero launch mode for this profile flag. + let sight_convergence = control.native_profile_words[21] == 0; let autonomous_fire_distance = f32::from_bits(control.native_profile_words[22]); let volume = control.node_data.as_ref().and_then(|data| { let amount = data.rows.first()?.max_volume; @@ -88,6 +92,7 @@ pub(super) fn load_projectile( speed, lifetime_ms, volume, + sight_convergence, autonomous_fire_distance, }) } -- cgit v1.2.3