1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +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:
Bartłomiej Dach 2023-06-24 15:35:07 +02:00
parent 8fdd599b39
commit 66ef199fa4
No known key found for this signature in database
2 changed files with 11 additions and 6 deletions

View File

@ -128,6 +128,8 @@ namespace osu.Game.Scoring.Legacy
int lastTime = 0;
if (score.Replay != null)
{
foreach (var f in score.Replay.Frames)
{
var legacyFrame = getLegacyFrame(f);
@ -137,6 +139,7 @@ namespace osu.Game.Scoring.Legacy
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,
// which then would break decoding.

View File

@ -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;