diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-01 15:26:55 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-01 15:26:55 +0300 |
| commit | 2de3fd6567d6eee36910af260f1e5767213ba89c (patch) | |
| tree | 72c0187b4716aab76027b9a0df1055e06cb1a5b6 /crates/fparkan-runtime/src/projectile.rs | |
| parent | 900aa7e51ecf26bc242f7853bdbcad68eb02b31a (diff) | |
| download | fparkan-2de3fd6567d6eee36910af260f1e5767213ba89c.tar.xz fparkan-2de3fd6567d6eee36910af260f1e5767213ba89c.zip | |
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.
Diffstat (limited to 'crates/fparkan-runtime/src/projectile.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/projectile.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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<f32>, + /// 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, }) } |
