diff options
Diffstat (limited to 'apps/fparkan-game/src/player_fire.rs')
| -rw-r--r-- | apps/fparkan-game/src/player_fire.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/fparkan-game/src/player_fire.rs b/apps/fparkan-game/src/player_fire.rs index 1a0a0788..96123e2d 100644 --- a/apps/fparkan-game/src/player_fire.rs +++ b/apps/fparkan-game/src/player_fire.rs @@ -4,15 +4,16 @@ use super::{ }; use fparkan_runtime::{ - loaded_mission_assets, projectile_sight_target, remote_auto_gunner_weapons, - turret_sight_points, FiringEffectInstance, PlayerWeaponWarning, PlayerWeapons, + loaded_mission_assets, projectile_sight_target, remote_warbot_control, turret_sight_points, + FiringEffectInstance, PlayerWeaponWarning, RemoteWarbotControl, }; impl StaticVulkanApp { - pub(super) fn auto_gunner_weapons(&self) -> Option<&PlayerWeapons> { + pub(super) fn uses_automatic_weapons(&self) -> bool { self.mission_engine .as_ref() - .and_then(remote_auto_gunner_weapons) + .and_then(remote_warbot_control) + .is_some_and(|mode| mode != RemoteWarbotControl::Manual) } pub(super) fn sample_player_fire( @@ -27,7 +28,7 @@ impl StaticVulkanApp { let Some(cockpit) = self.cockpit else { return (Vec::new(), Vec::new()); }; - if self.auto_gunner_weapons().is_some() + if self.uses_automatic_weapons() || self.mission_frame.is_none() || !self .player_weapon_layouts |
