aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/unit_patrol.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/fparkan-runtime/src/unit_patrol.rs')
-rw-r--r--crates/fparkan-runtime/src/unit_patrol.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/fparkan-runtime/src/unit_patrol.rs b/crates/fparkan-runtime/src/unit_patrol.rs
index 6a230135..1d83eaa8 100644
--- a/crates/fparkan-runtime/src/unit_patrol.rs
+++ b/crates/fparkan-runtime/src/unit_patrol.rs
@@ -580,7 +580,11 @@ impl UnitPatrol {
}
}
for unit in &mut state.units {
- if self.is_leaving_factory(unit.handle) {
+ if self.is_leaving_factory(unit.handle)
+ || mission
+ .boarding
+ .is_some_and(|control| control.remote && control.cockpit.handle == unit.handle)
+ {
continue;
}
let Ok(before) = transform_state(world, unit.handle) else {