mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:52:55 +08:00
Fix instant spinners giving insane amounts of strain
This commit is contained in:
parent
17e0498860
commit
b72b071c25
@ -69,23 +69,26 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
|
||||
TravelDistance = lastSlider.LazyTravelDistance * scalingFactor;
|
||||
}
|
||||
|
||||
Vector2 lastCursorPosition = getEndCursorPosition(lastObject);
|
||||
|
||||
// Don't need to jump to reach spinners
|
||||
if (!(BaseObject is Spinner))
|
||||
JumpDistance = (BaseObject.StackedPosition * scalingFactor - lastCursorPosition * scalingFactor).Length;
|
||||
|
||||
if (lastLastObject != null)
|
||||
if (!(lastObject is Spinner))
|
||||
{
|
||||
Vector2 lastLastCursorPosition = getEndCursorPosition(lastLastObject);
|
||||
Vector2 lastCursorPosition = getEndCursorPosition(lastObject);
|
||||
|
||||
Vector2 v1 = lastLastCursorPosition - lastObject.StackedPosition;
|
||||
Vector2 v2 = BaseObject.StackedPosition - lastCursorPosition;
|
||||
// Don't need to jump to reach spinners
|
||||
if (!(BaseObject is Spinner))
|
||||
JumpDistance = (BaseObject.StackedPosition * scalingFactor - lastCursorPosition * scalingFactor).Length;
|
||||
|
||||
float dot = Vector2.Dot(v1, v2);
|
||||
float det = v1.X * v2.Y - v1.Y * v2.X;
|
||||
if (lastLastObject != null)
|
||||
{
|
||||
Vector2 lastLastCursorPosition = getEndCursorPosition(lastLastObject);
|
||||
|
||||
Angle = Math.Abs(Math.Atan2(det, dot));
|
||||
Vector2 v1 = lastLastCursorPosition - lastObject.StackedPosition;
|
||||
Vector2 v2 = BaseObject.StackedPosition - lastCursorPosition;
|
||||
|
||||
float dot = Vector2.Dot(v1, v2);
|
||||
float det = v1.X * v2.Y - v1.Y * v2.X;
|
||||
|
||||
Angle = Math.Abs(Math.Atan2(det, dot));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user