diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 19:37:09 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 19:37:09 +0300 |
| commit | 1f366ac0d39a3b1f0b19721ed78936bad1e504dd (patch) | |
| tree | 431e3cebf1f3c96af086e928b3acdae53df48d1c /crates/fparkan-runtime/src/manual_flight.rs | |
| parent | f3d1b4d2aff8e47003626129641c36e44c7fb040 (diff) | |
| download | fparkan-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/manual_flight.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/manual_flight.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/fparkan-runtime/src/manual_flight.rs b/crates/fparkan-runtime/src/manual_flight.rs index db6bee42..cac50b41 100644 --- a/crates/fparkan-runtime/src/manual_flight.rs +++ b/crates/fparkan-runtime/src/manual_flight.rs @@ -88,7 +88,7 @@ impl FlightDrive { } } -fn ramp_axis(velocity: f32, target: f32, acceleration: f32, seconds: f32) -> (f32, f32) { +pub(super) fn ramp_axis(velocity: f32, target: f32, acceleration: f32, seconds: f32) -> (f32, f32) { if acceleration == 0.0 || velocity == target { return (velocity, velocity * seconds); } |
