aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/boarding.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-26 19:37:09 +0300
committerValentin Popov <valentin@popov.link>2026-11-26 19:37:09 +0300
commit1f366ac0d39a3b1f0b19721ed78936bad1e504dd (patch)
tree431e3cebf1f3c96af086e928b3acdae53df48d1c /crates/fparkan-runtime/src/boarding.rs
parentf3d1b4d2aff8e47003626129641c36e44c7fb040 (diff)
downloadfparkan-1f366ac0d39a3b1f0b19721ed78936bad1e504dd.tar.xz
fparkan-1f366ac0d39a3b1f0b19721ed78936bad1e504dd.zip
fix(movement): carry hero walking velocity between ticks
Take both horizontal limits and acceleration from the active Control profile. Apply the measured slope braking after the input update and clear velocity on a blocking wall, teleport or boarding. Keep the terrain limit during geometric sweeps so momentum cannot skip a narrow cliff. In the stock Firing Line window the hero reached the slope, stopped at its foot, backed away, and coasted on key release.
Diffstat (limited to 'crates/fparkan-runtime/src/boarding.rs')
-rw-r--r--crates/fparkan-runtime/src/boarding.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/boarding.rs b/crates/fparkan-runtime/src/boarding.rs
index cb15f420..afb2e50d 100644
--- a/crates/fparkan-runtime/src/boarding.rs
+++ b/crates/fparkan-runtime/src/boarding.rs
@@ -142,6 +142,7 @@ pub fn board_friendly_warbot(
flight_velocity: [0.0; 3],
});
mission.player_pitch_bits = 0;
+ mission.hero_walk_velocity = [0.0; 2];
}
Ok(Some(cockpit))
}
@@ -222,6 +223,7 @@ pub fn disembark_warbot(engine: &mut Engine) -> Result<Option<StartingCockpit>,
}
mission.boarding = None;
mission.player_pitch_bits = 0;
+ mission.hero_walk_velocity = [0.0; 2];
Ok(Some(hero))
}