From b9eebd22cde510bea9553470e7384fe61a41b5c0 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 11:26:10 +0400 Subject: fix(combat): use authored range for autonomous weapons --- crates/fparkan-runtime/src/projectile.rs | 3 +++ 1 file changed, 3 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 4ffb6fae..48018933 100644 --- a/crates/fparkan-runtime/src/projectile.rs +++ b/crates/fparkan-runtime/src/projectile.rs @@ -25,6 +25,7 @@ pub struct ProjectileAssets { pub lifetime_ms: u32, /// Initial provider volume of the projectile. pub volume: Option, + pub(super) autonomous_fire_distance: f32, } /// Prepares the BULL prototype referenced by a manual weapon. @@ -74,6 +75,7 @@ pub(super) fn load_projectile( }; let speed = f32::from_bits(control.native_profile_words[7]); let lifetime_ms = control.native_profile_words[18]; + 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; (amount.is_finite() && amount > 0.0).then_some(amount) @@ -86,6 +88,7 @@ pub(super) fn load_projectile( speed, lifetime_ms, volume, + autonomous_fire_distance, }) } -- cgit v1.2.3