aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/lib.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-01 20:39:54 +0300
committerValentin Popov <valentin@popov.link>2026-12-01 20:39:54 +0300
commit3c6341d162de663ade969f2d0df8510b89a69da7 (patch)
tree221648859379b9ff4184610f82cf46fa8edc0da1 /crates/fparkan-runtime/src/lib.rs
parent9238e2ec8c578145629b5b774b15a0aa205aee32 (diff)
downloadfparkan-3c6341d162de663ade969f2d0df8510b89a69da7.tar.xz
fparkan-3c6341d162de663ade969f2d0df8510b89a69da7.zip
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.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
-rw-r--r--crates/fparkan-runtime/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
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)