Skip to content

Commit

Permalink
Merge pull request #93 from SomeoneSom/master
Browse files Browse the repository at this point in the history
Fix: Jadderline now adds the correct friction values
  • Loading branch information
psyGamer authored Nov 29, 2024
2 parents bb804a7 + ad12191 commit 7a731fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Studio/CelesteStudio/Tool/JadderlineForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 7a731fb

Please sign in to comment.