1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 16:12:54 +08:00

Invert unintuitive variable

This commit is contained in:
smoogipoo 2019-03-19 14:12:10 +09:00
parent 1b696ade50
commit 5b07cce3cb

View File

@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Catch.Mods
return; return;
} }
float positionDiff = lastPosition.Value - position; float positionDiff = position - lastPosition.Value;
double timeDiff = startTime - lastStartTime; double timeDiff = startTime - lastStartTime;
if (timeDiff > 1000) if (timeDiff > 1000)
@ -99,13 +99,15 @@ namespace osu.Game.Rulesets.Catch.Mods
{ {
if (amount > 0) if (amount > 0)
{ {
if (position - amount > 0) // Clamp to the right bound
position -= amount; if (position + amount < 1)
position += amount;
} }
else else
{ {
if (position - amount < 1) // Clamp to the left bound
position -= amount; if (position + amount > 0)
position += amount;
} }
} }
} }