1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 05:27:23 +08:00

Fix replays not correctly considering negative time diffs

This commit is contained in:
smoogipoo 2018-01-17 15:21:49 +09:00
parent d8275c4f9b
commit 52b48f2b7e

View File

@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using osu.Framework.Platform;
using osu.Game.Beatmaps;
using osu.Game.Database;
@ -129,7 +130,14 @@ namespace osu.Game.Rulesets.Scoring
{
var split = l.Split('|');
if (split.Length < 4 || float.Parse(split[0]) < 0) continue;
if (split.Length < 4)
continue;
if (split[0] == "-12345")
{
// Todo: The seed is provided in split[3], which we'll need to use at some point
continue;
}
lastTime += float.Parse(split[0]);
@ -141,7 +149,7 @@ namespace osu.Game.Rulesets.Scoring
));
}
return new Replay { Frames = frames };
return new Replay { Frames = frames.OrderBy(f => f.Time).ToList() };
}
}
}