diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 10:26:10 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 10:26:10 +0300 |
| commit | b9eebd22cde510bea9553470e7384fe61a41b5c0 (patch) | |
| tree | dd7e2579208e7f1831c6b256065ac58a9578a93b /crates/fparkan-runtime/src/projectile.rs | |
| parent | ec513e13e598964e8139bf3518bb35ebee176b7a (diff) | |
| download | fparkan-b9eebd22cde510bea9553470e7384fe61a41b5c0.tar.xz fparkan-b9eebd22cde510bea9553470e7384fe61a41b5c0.zip | |
fix(combat): use authored range for autonomous weapons
Diffstat (limited to 'crates/fparkan-runtime/src/projectile.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/projectile.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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<f32>, + 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, }) } |
