1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:03:11 +08:00

Fix precision loss on exporting legacy replays

This commit is contained in:
PercyDan54 2021-04-28 19:27:18 +08:00
parent 6cadbd48dc
commit 126056c436
No known key found for this signature in database
GPG Key ID: 6AEA7C525131BAF3

View File

@ -95,8 +95,9 @@ namespace osu.Game.Scoring.Legacy
foreach (var f in score.Replay.Frames.OfType<IConvertibleReplayFrame>().Select(f => f.ToLegacy(beatmap)))
{
replayData.Append(FormattableString.Invariant($"{(int)Math.Round(f.Time - lastF.Time)}|{f.MouseX ?? 0}|{f.MouseY ?? 0}|{(int)f.ButtonState},"));
replayData.Append(FormattableString.Invariant($"{Math.Round(f.Time - lastF.Time)}|{f.MouseX ?? 0}|{f.MouseY ?? 0}|{(int)f.ButtonState},"));
lastF = f;
lastF.Time = Math.Round(f.Time);
}
}