mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 03:42:57 +08:00
Revert nullability enable in Score
(and related changes)
Causes several knock-on inspections in `OsuGame` et al. Probably best addressed in a separate pass, because treatment is mixed at best (some places nullcheck, some expect non-null).
This commit is contained in:
parent
8fdd599b39
commit
66ef199fa4
@ -128,14 +128,17 @@ namespace osu.Game.Scoring.Legacy
|
||||
|
||||
int lastTime = 0;
|
||||
|
||||
foreach (var f in score.Replay.Frames)
|
||||
if (score.Replay != null)
|
||||
{
|
||||
var legacyFrame = getLegacyFrame(f);
|
||||
foreach (var f in score.Replay.Frames)
|
||||
{
|
||||
var legacyFrame = getLegacyFrame(f);
|
||||
|
||||
// Rounding because stable could only parse integral values
|
||||
int time = (int)Math.Round(legacyFrame.Time + offset);
|
||||
replayData.Append(FormattableString.Invariant($"{time - lastTime}|{legacyFrame.MouseX ?? 0}|{legacyFrame.MouseY ?? 0}|{(int)legacyFrame.ButtonState},"));
|
||||
lastTime = time;
|
||||
// Rounding because stable could only parse integral values
|
||||
int time = (int)Math.Round(legacyFrame.Time + offset);
|
||||
replayData.Append(FormattableString.Invariant($"{time - lastTime}|{legacyFrame.MouseX ?? 0}|{legacyFrame.MouseY ?? 0}|{(int)legacyFrame.ButtonState},"));
|
||||
lastTime = time;
|
||||
}
|
||||
}
|
||||
|
||||
// Warning: this is purposefully hardcoded as a string rather than interpolating, as in some cultures the minus sign is not encoded as the standard ASCII U+00C2 codepoint,
|
||||
|
@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using osu.Game.Replays;
|
||||
using osu.Game.Utils;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user