diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 13:21:58 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 13:21:58 +0300 |
| commit | b201e339c804aba7b9ef023833b7aee4fab96d96 (patch) | |
| tree | d479496aeacafd1dc144ea52c5bd129586668b49 /apps/fparkan-game | |
| parent | bfc283603ff9fc48b2dff3673a56f7ad481e1031 (diff) | |
| download | fparkan-b201e339c804aba7b9ef023833b7aee4fab96d96.tar.xz fparkan-b201e339c804aba7b9ef023833b7aee4fab96d96.zip | |
fix(player): use the Control forward limit for walking
Read the live Control profile for walking along the body's heading. The stock Firing Range window advances at roughly 14 units per second while the key is held. Size collision sweeps from actual requested displacement so the stock factory entrance, passage and exit still work.
Diffstat (limited to 'apps/fparkan-game')
| -rw-r--r-- | apps/fparkan-game/src/main.rs | 2 | ||||
| -rw-r--r-- | apps/fparkan-game/src/player_collision.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/fparkan-game/src/main.rs b/apps/fparkan-game/src/main.rs index 6a1a046a..1c55502b 100644 --- a/apps/fparkan-game/src/main.rs +++ b/apps/fparkan-game/src/main.rs @@ -14070,7 +14070,7 @@ mod tests { &engine, cockpit, PlayerMotion { - movement: [(x - hx) / distance, (y - hy) / distance], + movement: [(x - hx) / distance, (y - hy) / distance * (8.0 / 14.0)], delta_seconds: distance.min(8.0 * 0.292) / 8.0, ..PlayerMotion::default() }, diff --git a/apps/fparkan-game/src/player_collision.rs b/apps/fparkan-game/src/player_collision.rs index adf6f339..5e1ed12e 100644 --- a/apps/fparkan-game/src/player_collision.rs +++ b/apps/fparkan-game/src/player_collision.rs @@ -227,7 +227,7 @@ mod tests { &engine, cockpit, PlayerMotion { - movement: [dx * cos + dy * sin, dy * cos - dx * sin], + movement: [dx * cos + dy * sin, (dy * cos - dx * sin) * (8.0 / 14.0)], delta_seconds: distance.min(0.8) / 8.0, ..Default::default() }, @@ -386,7 +386,7 @@ mod tests { &engine, cockpit, PlayerMotion { - movement: [dx * cos + dy * sin, dy * cos - dx * sin], + movement: [dx * cos + dy * sin, (dy * cos - dx * sin) * (8.0 / 14.0)], delta_seconds: distance.min(0.8) / 8.0, ..Default::default() }, |
