aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/lib.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-14 19:41:29 +0300
committerValentin Popov <valentin@popov.link>2026-11-14 19:41:29 +0300
commit2420e84d82cc1afdafc70882e51d4482dcdaad5b (patch)
tree05cf5155c5cf0ec06c2429e413671433b1e8f7ce /crates/fparkan-runtime/src/lib.rs
parent7b04b7760373ee8d86f5652b1bd2914a8ee2db79 (diff)
downloadfparkan-2420e84d82cc1afdafc70882e51d4482dcdaad5b.tar.xz
fparkan-2420e84d82cc1afdafc70882e51d4482dcdaad5b.zip
feat(ai): patrol around script-selected objects
Uses the TMA logical ID to route a warbot around the current position of a building or unit. The original Behavior.dll confirms target class selection and radius. Mission 13 now assigns building patrols at stock startup.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
-rw-r--r--crates/fparkan-runtime/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs
index a17dd6ab..04aa8858 100644
--- a/crates/fparkan-runtime/src/lib.rs
+++ b/crates/fparkan-runtime/src/lib.rs
@@ -2528,12 +2528,12 @@ fn load_mission_with_options(
let Some(patrol) = &mut unit_patrol else {
continue;
};
- if let Some(handle) =
+ if let Some((handle, center)) =
order.apply(patrol, &mission, &object_drafts, &new_runtime_world)
{
eprintln!(
"script_init_patrol unit={} id={} target={:?}",
- handle.slot, order.actor_id, order.center
+ handle.slot, order.actor_id, center
);
}
}