summaryrefslogtreecommitdiff
path: root/test-client
diff options
context:
space:
mode:
Diffstat (limited to 'test-client')
-rw-r--r--test-client/movement.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/test-client/movement.ts b/test-client/movement.ts
index 62846edf..7d395396 100644
--- a/test-client/movement.ts
+++ b/test-client/movement.ts
@@ -37,7 +37,8 @@ export interface MovementBase {
}
export function update_movement(p: MovementBase, dt: number, direction: V2, boost: boolean) {
- if (length(direction) > 0.1) lerp_exp_v2_mut(p.facing, direction, dt * 10.)
+ if (length(direction) > 0.05) lerp_exp_v2_mut(p.facing, direction, dt * 10.)
+ if (length(direction) < 0.5) direction.x = direction.y = 0
p.rot = Math.atan2(p.facing.x, p.facing.y)
boost &&= length(direction) > 0.1
p.boosting = boost && (p.boosting || p.stamina >= 1) && p.stamina > 0