mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 19:12:54 +08:00
Fix formatting
This commit is contained in:
parent
4fe1497f63
commit
e716162ac2
@ -8,7 +8,6 @@ using System.Text;
|
|||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.IO.Legacy;
|
using osu.Game.IO.Legacy;
|
||||||
using osu.Game.Replays.Legacy;
|
|
||||||
using osu.Game.Rulesets.Replays.Types;
|
using osu.Game.Rulesets.Replays.Types;
|
||||||
using SharpCompress.Compressors.LZMA;
|
using SharpCompress.Compressors.LZMA;
|
||||||
|
|
||||||
@ -91,13 +90,14 @@ namespace osu.Game.Scoring.Legacy
|
|||||||
|
|
||||||
if (score.Replay != null)
|
if (score.Replay != null)
|
||||||
{
|
{
|
||||||
int lastTimeRounded = 0;
|
int lastTime = 0;
|
||||||
|
|
||||||
foreach (var f in score.Replay.Frames.OfType<IConvertibleReplayFrame>().Select(f => f.ToLegacy(beatmap)))
|
foreach (var f in score.Replay.Frames.OfType<IConvertibleReplayFrame>().Select(f => f.ToLegacy(beatmap)))
|
||||||
{
|
{
|
||||||
// Rounding because stable could only parse integral values
|
// Rounding because stable could only parse integral values
|
||||||
int timeRounded = (int)Math.Round(f.Time);
|
int time = (int)Math.Round(f.Time);
|
||||||
replayData.Append(FormattableString.Invariant($"{timeRounded - lastTimeRounded}|{f.MouseX ?? 0}|{f.MouseY ?? 0}|{(int)f.ButtonState},"));
|
replayData.Append(FormattableString.Invariant($"{time - lastTime}|{f.MouseX ?? 0}|{f.MouseY ?? 0}|{(int)f.ButtonState},"));
|
||||||
lastTimeRounded = timeRounded;
|
lastTime = time;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user