From fed62dcd08dfdb4a1c3fb4f78b8dfe241a1a8dbf Mon Sep 17 00:00:00 2001 From: yuni Date: Sun, 17 Nov 2024 03:50:21 +0100 Subject: [PATCH] comment --- src/actor.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/actor.rs b/src/actor.rs index 0656cfd..3bfc6cd 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -859,11 +859,13 @@ fn handle_wants_acceleration( } if accel.direction != DVec3::ZERO { - // Player is pressing AWSD keys + // Player is pressing AWSD keys. + // When braking AND accelerating, boost acceleration a bit to + // overcome the braking and cause a slow acceleration: let brake_factor = if accel.brake { 1.10 } else { 1.0 }; delta_v += accel.direction.normalize() * brake_factor; } else if accel.brake { - // Player is only pressing space + // Player is only pressing space. allow_fullstop = true; }