diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-02 13:59:29 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-02 13:59:29 +0300 |
| commit | 98569dc5e8ee01b19ee82852a807f6a2b911dae4 (patch) | |
| tree | 71dce6e11eaef918fc817b9393c0e190f661dd1c /apps/fparkan-game/src/main.rs | |
| parent | 05da53f0344416a5f14211a73f1f48d72c88b954 (diff) | |
| download | fparkan-98569dc5e8ee01b19ee82852a807f6a2b911dae4.tar.xz fparkan-98569dc5e8ee01b19ee82852a807f6a2b911dae4.zip | |
feat(ui): watch a warbot on autopilot from its cockpit
Diffstat (limited to 'apps/fparkan-game/src/main.rs')
| -rw-r--r-- | apps/fparkan-game/src/main.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/fparkan-game/src/main.rs b/apps/fparkan-game/src/main.rs index 57890f8f..325607d5 100644 --- a/apps/fparkan-game/src/main.rs +++ b/apps/fparkan-game/src/main.rs @@ -9864,9 +9864,7 @@ impl StaticVulkanApp { state.scale.map(f32::from_bits), point, pose.rotation, - self.auto_gunner_weapons() - .is_none() - .then(|| f32::from_bits(frame.player_pitch_bits)), + (!self.uses_automatic_weapons()).then(|| f32::from_bits(frame.player_pitch_bits)), )?; let sights_view = sights.try_direct3d7_view_row_major()?; let camera = sights @@ -10608,15 +10606,16 @@ impl StaticVulkanApp { ) }) }); - let auto_gunner = self + let automatic_weapons = self.uses_automatic_weapons(); + let autonomous_bank = self .mission_engine .as_ref() - .and_then(fparkan_runtime::remote_auto_gunner_weapons); + .and_then(fparkan_runtime::remote_automatic_weapons); update_gameplay_animation_pose_buffers( &mut self.control_animation_instances, &mut self.component_pose_buffers, control_clock_ms, - self.cockpit.filter(|_| auto_gunner.is_none()).zip( + self.cockpit.filter(|_| !automatic_weapons).zip( self.mission_frame .as_ref() .map(|frame| f32::from_bits(frame.player_pitch_bits)), @@ -10633,7 +10632,7 @@ impl StaticVulkanApp { ) }), self.cockpit.and_then(|cockpit| { - auto_gunner + autonomous_bank .or_else(|| self.player_weapon_banks.get(&cockpit.handle)) .map(|bank| (cockpit.object_index, bank)) }), |
