aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game/src/mission_overlay.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/fparkan-game/src/mission_overlay.rs')
-rw-r--r--apps/fparkan-game/src/mission_overlay.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/fparkan-game/src/mission_overlay.rs b/apps/fparkan-game/src/mission_overlay.rs
index 0b0eec9a..e9a48cc0 100644
--- a/apps/fparkan-game/src/mission_overlay.rs
+++ b/apps/fparkan-game/src/mission_overlay.rs
@@ -281,7 +281,19 @@ impl StaticVulkanApp {
.command_view
.as_ref()
.and_then(|view| view.order_panel(&warbot_rows));
- roster.draw(renderer, warbot_rows, selected_warbot, card, orders)?;
+ let manual_control_enabled = selected_warbot
+ .zip(self.mission_engine.as_ref().zip(self.cockpit))
+ .is_some_and(|(target, (engine, hero))| {
+ fparkan_runtime::can_control_warbot_remotely(engine, hero, target)
+ });
+ roster.draw(
+ renderer,
+ warbot_rows,
+ selected_warbot,
+ card,
+ manual_control_enabled,
+ orders,
+ )?;
}
if let Some(map) = &mut self.overlay.satellite_map {
let demo_target = self