Skip to content

Commit

Permalink
Fix zero-delta replay frames breaking spinners
Browse files Browse the repository at this point in the history
  • Loading branch information
Wieku committed Aug 30, 2023
1 parent 42cd0d1 commit e462365
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/rulesets/osu/spinner.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ func (spinner *Spinner) UpdateFor(player *difficultyPlayer, time int64, _ bool)

if math.Abs(angleDiff) < math.Pi {
if player.diff.GetModifiedTime(state.frameVariance) > FrameTime*1.04 {
state.theoreticalVelocity = angleDiff / player.diff.GetModifiedTime(timeDiff)
if timeDiff > 0 {
state.theoreticalVelocity = angleDiff / player.diff.GetModifiedTime(timeDiff)
} else {
state.theoreticalVelocity = 0
}
} else {
state.theoreticalVelocity = angleDiff / FrameTime
}
Expand Down

0 comments on commit e462365

Please sign in to comment.