mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 11:12:59 +08:00
Fix replay frames sort instability
This commit is contained in:
parent
a8db63498a
commit
b2130fc600
@ -4,7 +4,7 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Game.Input.Handlers;
|
using osu.Game.Input.Handlers;
|
||||||
using osu.Game.Replays;
|
using osu.Game.Replays;
|
||||||
@ -97,7 +97,7 @@ namespace osu.Game.Rulesets.Replays
|
|||||||
{
|
{
|
||||||
// TODO: This replay frame ordering should be enforced on the Replay type.
|
// TODO: This replay frame ordering should be enforced on the Replay type.
|
||||||
// Currently, the ordering can be broken if the frames are added after this construction.
|
// Currently, the ordering can be broken if the frames are added after this construction.
|
||||||
replay.Frames.Sort((x, y) => x.Time.CompareTo(y.Time));
|
replay.Frames = replay.Frames.OrderBy(f => f.Time).ToList();
|
||||||
|
|
||||||
this.replay = replay;
|
this.replay = replay;
|
||||||
currentFrameIndex = -1;
|
currentFrameIndex = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user