Fix spinners showing very weird numbers after rewinding

Fixes #1462
This commit is contained in:
smoogipoo 2017-11-06 17:22:22 +09:00
parent 2fbd490626
commit c7426ebed8
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Sprites;
@ -61,6 +62,10 @@ private struct RotationRecord
public void SetRotation(float currentRotation)
{
// If we've gone back in time, it's fine to work with a fresh set of records for now
if (records.Count > 0 && Time.Current < records.Last().Time)
records.Clear();
if (records.Count > 0)
{
var record = records.Peek();