From 3c6341d162de663ade969f2d0df8510b89a69da7 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 1 Dec 2026 21:39:54 +0400 Subject: fix(control): board a captured warbot on the same Enter The native Enter branch transfers the neutral owner before requesting a cockpit switch when the pilot device works. The firing-range window captured and boarded each of its two warbots on one press, and Teleport still credited the mobile HQ without boarding. --- crates/fparkan-runtime/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/fparkan-runtime/src/lib.rs') diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index 98592d6a..b6efbcf0 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -171,7 +171,8 @@ pub use wheel_animation::WheelAnimation; pub use aim_convergence::{projectile_sight_target, turret_sight_points}; pub use autodemo::{autodemo_camera, AutoDemoCamera, AutoDemoReinforcement, AutoDemoView}; pub use boarding::{ - board_friendly_warbot, disembark_warbot, player_vehicle, select_boarding_target, + board_friendly_warbot, disembark_warbot, enter_vehicle, player_vehicle, select_boarding_target, + VehicleEntry, }; pub use building_door::{has_proximity_doors, sample_capture_doors, sample_proximity_doors}; pub use capture_barrier::sample_capture_barrier; @@ -18019,10 +18020,9 @@ mod tests { let mut pose = transform_state(&engine.world, cockpit.handle).unwrap(); pose.position = transform_state(&engine.world, hq).unwrap().position; set_transform(&mut engine.world, cockpit.handle, pose).unwrap(); - assert_eq!( - capture_neutral_warbot(&mut engine, cockpit).unwrap(), - Some(OriginalObjectId(0)) - ); + let entry = enter_vehicle(&mut engine, cockpit, None).unwrap(); + assert_eq!(entry.captured, Some(OriginalObjectId(0))); + assert_eq!(entry.cockpit, None); assert_eq!( mission_object_handle(&engine, OriginalObjectId(0)), Some(hq) -- cgit v1.2.3