diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 14:53:30 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 14:53:30 +0300 |
| commit | 3cc3db073cc0661cfdd4116923ae4e312b64ec16 (patch) | |
| tree | 9621cca8c030e7ca0a8696916244945987b79aef /crates/fparkan-runtime/src/lib.rs | |
| parent | 94a65ec3f69ff92538b9b345033405fb51c5c8eb (diff) | |
| download | fparkan-3cc3db073cc0661cfdd4116923ae4e312b64ec16.tar.xz fparkan-3cc3db073cc0661cfdd4116923ae4e312b64ec16.zip | |
feat(mission): open the main teleporter's lower passage
Use the authored Res17 entry and destination markers for an unboarded hero at an owned main teleporter. The original Behavior.dll entry callback at RVA 0x18ac0 checks the owner, hero and generators, then transfers to the marked destination. Original SHA-256 ddfbdbde07832358fe6e35e01c8dba9b58e7313789498b6049ed51d4ed9baf99.
Verified with the licensed transfer regression and a Vulkan input replay from the untouched Teleport mission start through the capture, transfer and lower passage. Generator selection and the hero contact point remain approximate.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/lib.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index 092472e6..a897839b 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -91,6 +91,7 @@ use behavior_clock::next_crt_rand; mod mesh_collision; mod mining; pub use laboratory::LaboratoryReport; +mod main_teleport; mod manual_chassis; mod manual_flight; mod mission_events; @@ -2999,8 +3000,16 @@ pub fn frame_with_player_motion( if blocked { pose.position = previous.position; } - set_transform(&mut engine.world, cockpit.handle, pose)?; let drowned = !blocked && player_motion::drowns(engine, cockpit, motion); + let landing = motion.sweep.and_then(|[_, body]| { + (!blocked && !drowned) + .then(|| main_teleport::landing_position(engine, cockpit, body)) + .flatten() + }); + if let Some(position) = landing { + pose.position = position; + } + set_transform(&mut engine.world, cockpit.handle, pose)?; if drowned { fparkan_world::request_delete(&mut engine.world, cockpit.handle)?; } @@ -3013,6 +3022,7 @@ pub fn frame_with_player_motion( player_motion::commit_flight(mission, cockpit, motion, blocked); if !blocked && !drowned + && landing.is_none() && mission.player_gait.footfall && mission.local_hero == Some(cockpit.handle) { |
