diff options
Diffstat (limited to 'apps/fparkan-game/src/main.rs')
| -rw-r--r-- | apps/fparkan-game/src/main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/fparkan-game/src/main.rs b/apps/fparkan-game/src/main.rs index ef7602ea..87690e3d 100644 --- a/apps/fparkan-game/src/main.rs +++ b/apps/fparkan-game/src/main.rs @@ -10494,6 +10494,9 @@ impl StaticVulkanApp { // shortcut: the camera supplies a shared aim direction until native // per-weapon CPT direction and turret alignment agree in world space. let direction = self.view_camera.forward; + if let Some(engine) = &self.mission_engine { + weapons.read_control_energy(engine, cockpit.handle); + } for (slot, weapon, barrel) in weapons.fire(trigger, clock_ms) { let hierarchy = self .component_pose_buffers @@ -10573,6 +10576,9 @@ impl StaticVulkanApp { } } } + if let Some(engine) = &mut self.mission_engine { + weapons.publish_control_energy(engine, cockpit.handle); + } } fn advance_player_projectiles(&mut self, clock_ms: u32) -> Result<(), String> { |
