From 1f366ac0d39a3b1f0b19721ed78936bad1e504dd Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 20:37:09 +0400 Subject: 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. --- apps/fparkan-game/src/main.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'apps/fparkan-game/src/main.rs') diff --git a/apps/fparkan-game/src/main.rs b/apps/fparkan-game/src/main.rs index b00605ab..a328ccad 100644 --- a/apps/fparkan-game/src/main.rs +++ b/apps/fparkan-game/src/main.rs @@ -14055,11 +14055,7 @@ mod tests { let step = plan_player_motion_with_collision( &engine, cockpit, - PlayerMotion { - movement: [(x - hx) / distance, (y - hy) / distance * (8.0 / 14.0)], - delta_seconds: distance.min(8.0 * 0.292) / 8.0, - ..PlayerMotion::default() - }, + player_collision::walk_toward(hero, [x, y], 2.0), |step| { app.resolve_player_building_step(step) .map_err(EngineError::Movement) -- cgit v1.2.3