aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/control_resources.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/fparkan-runtime/src/control_resources.rs')
-rw-r--r--crates/fparkan-runtime/src/control_resources.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/fparkan-runtime/src/control_resources.rs b/crates/fparkan-runtime/src/control_resources.rs
index 3e7f8aab..676f7008 100644
--- a/crates/fparkan-runtime/src/control_resources.rs
+++ b/crates/fparkan-runtime/src/control_resources.rs
@@ -133,7 +133,11 @@ pub(super) fn tick(engine: &mut Engine, now_ms: u32) {
continue;
};
if mobile_owner {
- repair_zone::service_unit(table, world, pose, &facilities, seconds);
+ let docked = mission
+ .unit_patrol
+ .as_ref()
+ .is_some_and(|patrol| patrol.is_servicing(table.handle));
+ repair_zone::service_unit(table, world, pose, &facilities, seconds, docked);
}
let object = table.original_id.map_or(table.handle.slot, |id| id.0);
let ticks = state.profiles.ticks.entry(object).or_default();