Skip to content

Commit

Permalink
Merge branch 'master' into fail-animation-update
Browse files Browse the repository at this point in the history
  • Loading branch information
bdach authored Oct 15, 2021
2 parents 7a5a612 + b1989e6 commit f6d98e8
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public OsuDifficultyHitObject(HitObject hitObject, HitObject lastLastObject, Hit

private void setDistances()
{
// We don't need to calculate either angle or distance when one of the last->curr objects is a spinner
if (BaseObject is Spinner || lastObject is Spinner)
return;

// We will scale distances by this factor, so we can assume a uniform CircleSize among beatmaps.
float scalingFactor = normalized_radius / (float)BaseObject.Radius;

Expand All @@ -71,11 +75,9 @@ private void setDistances()

Vector2 lastCursorPosition = getEndCursorPosition(lastObject);

// Don't need to jump to reach spinners
if (!(BaseObject is Spinner))
JumpDistance = (BaseObject.StackedPosition * scalingFactor - lastCursorPosition * scalingFactor).Length;
JumpDistance = (BaseObject.StackedPosition * scalingFactor - lastCursorPosition * scalingFactor).Length;

if (lastLastObject != null)
if (lastLastObject != null && !(lastLastObject is Spinner))
{
Vector2 lastLastCursorPosition = getEndCursorPosition(lastLastObject);

Expand Down

0 comments on commit f6d98e8

Please sign in to comment.