diff options
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/fparkan-game/src/main.rs | 6 | ||||
| -rw-r--r-- | apps/fparkan-game/src/script_coverage.rs | 13 |
2 files changed, 19 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> { diff --git a/apps/fparkan-game/src/script_coverage.rs b/apps/fparkan-game/src/script_coverage.rs index abb63e15..56bb19ed 100644 --- a/apps/fparkan-game/src/script_coverage.rs +++ b/apps/fparkan-game/src/script_coverage.rs @@ -21,6 +21,19 @@ pub(super) fn log_script_init(engine: &Engine, mission: &str) { } pub(super) fn log_clan_ai_stops(report: &SimulationReport) { + for (object, count) in &report.mobile_budget.ticks { + eprintln!("sim_coverage control_mobile_budget_approx={count} object={object}"); + } + for ((object, reason), count) in &report.mobile_budget.stubs { + eprintln!( + "sim_coverage control_mobile_budget_stub={count} object={object} reason={reason}" + ); + } + for (object, count) in &report.mobile_budget.weapon_waits { + if *count > 0 { + eprintln!("sim_coverage weapon_energy_wait={count} object={object}"); + } + } for (object, count) in &report.control_profiles.ticks { eprintln!("sim_coverage control_profile_clock_approx={count} object={object}"); } |
