Fix many behavioural issues and add tests

This commit is contained in:
Dean Herbert
2019-03-28 19:28:13 +09:00
parent 09a7950a3b
commit 70f99400ad
4 changed files with 245 additions and 18 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Diagnostics;
using osu.Framework.Input.StateChanges;
using osu.Framework.MathUtils;
using osu.Game.Replays;
@ -27,7 +28,9 @@ namespace osu.Game.Rulesets.Catch.Replays
if (frame == null)
return null;
return Interpolation.ValueAt(CurrentTime, frame.Position, NextFrame.Position, frame.Time, NextFrame.Time);
Debug.Assert(CurrentTime != null);
return Interpolation.ValueAt(CurrentTime.Value, frame.Position, NextFrame.Position, frame.Time, NextFrame.Time);
}
}