From ad121911e87bd115289718aadffbb48ea76e9885 Mon Sep 17 00:00:00 2001 From: atpx8 <52360990+SomeoneSom@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:42:52 -0500 Subject: [PATCH] consider deltatime for friction calcs --- Studio/CelesteStudio/Tool/JadderlineForm.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Studio/CelesteStudio/Tool/JadderlineForm.cs b/Studio/CelesteStudio/Tool/JadderlineForm.cs index cbfd56f8..9241b0d1 100644 --- a/Studio/CelesteStudio/Tool/JadderlineForm.cs +++ b/Studio/CelesteStudio/Tool/JadderlineForm.cs @@ -13,7 +13,7 @@ namespace CelesteStudio.Tool; public sealed class JadderlineForm : Form { - private const string Version = "1.1.0"; + private const string Version = "1.1.1"; private readonly NumericStepper playerPos; private readonly NumericStepper playerSpeed; @@ -277,17 +277,17 @@ private static (double, float, float) MoveStep(bool input, double playerPos, flo mult = -1f; } if (!input) { // Holding neutral - playerSpeed -= frictionNorm * mult; + playerSpeed -= frictionNorm * mult * DeltaTime; if (playerSpeed * mult < 0f) { playerSpeed = 0f; } } else if (playerSpeed * mult <= max) { // Coming up to max speed - playerSpeed += frictionNorm * mult; + playerSpeed += frictionNorm * mult * DeltaTime; if (playerSpeed * mult > max) { playerSpeed = max * mult; } } else { // Over max speed - playerSpeed -= frictionOverMax * mult; + playerSpeed -= frictionOverMax * mult * DeltaTime; if (playerSpeed * mult < max) { playerSpeed = max * mult; }