aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/boarding.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-02 17:33:49 +0300
committerValentin Popov <valentin@popov.link>2026-12-02 17:33:49 +0300
commitbd7811533a348e56d2be9c7281d0533fc8c46024 (patch)
treefee2ca08f873d7eef94d26c2cabd51b3cd2e4ce6 /crates/fparkan-runtime/src/boarding.rs
parentda16b075618b792458bbb9ca19e856e9c4189c66 (diff)
downloadfparkan-bd7811533a348e56d2be9c7281d0533fc8c46024.tar.xz
fparkan-bd7811533a348e56d2be9c7281d0533fc8c46024.zip
feat(ui): follow mobile command posts with the strategic camera
Connect captured command vehicles and follow their native orbit. Verify the sweep and acceleration against the original DLL. In a Teleport debug copy, verify Enter, edge rotation and Esc with Vulkan validation enabled. The stock start opens cleanly. The stock route and the original window comparison remain pending.
Diffstat (limited to 'crates/fparkan-runtime/src/boarding.rs')
-rw-r--r--crates/fparkan-runtime/src/boarding.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/crates/fparkan-runtime/src/boarding.rs b/crates/fparkan-runtime/src/boarding.rs
index c453b74e..95acc7e0 100644
--- a/crates/fparkan-runtime/src/boarding.rs
+++ b/crates/fparkan-runtime/src/boarding.rs
@@ -61,7 +61,7 @@ pub fn player_vehicle(engine: &Engine) -> Option<StartingCockpit> {
Some(engine.loaded.as_ref()?.boarding.as_ref()?.cockpit)
}
-/// Selects the friendly warbot under a line of sight supplied by the camera.
+/// Selects an allied vehicle for boarding or a mobile command link.
pub fn select_boarding_target(
engine: &Engine,
hero: StartingCockpit,
@@ -79,14 +79,16 @@ pub fn select_boarding_target(
{
return None;
}
- let warbot = mission.object_drafts.iter().any(|draft| {
- draft.unit_dat_header_flags == Some(WARBOT_CLASS)
- && draft
- .original_id
- .and_then(|id| handle_by_original_id(&engine.world, id))
- == Some(target.handle)
+ let vehicle = mission.object_drafts.iter().any(|draft| {
+ matches!(
+ draft.unit_dat_header_flags,
+ Some(WARBOT_CLASS | crate::mission_events::MOBILE_HQ_CLASS)
+ ) && draft
+ .original_id
+ .and_then(|id| handle_by_original_id(&engine.world, id))
+ == Some(target.handle)
});
- (warbot
+ (vehicle
&& identity_metadata(&engine.world, target.handle)
.ok()?
.owner_id