1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Fix some NRT changes

This commit is contained in:
Joseph Madamba 2024-02-28 11:03:09 -08:00
parent 6e03384c6b
commit 5ca6e8c68a
2 changed files with 6 additions and 4 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Screens;
using osu.Game.Online.Spectator;
using osu.Game.Scoring;
@ -48,7 +49,8 @@ namespace osu.Game.Screens.Play
{
base.Dispose(isDisposing);
SpectatorClient.OnUserBeganPlaying -= userBeganPlaying;
if (SpectatorClient.IsNotNull())
SpectatorClient.OnUserBeganPlaying -= userBeganPlaying;
}
}
}

View File

@ -1,8 +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.
using System.Diagnostics;
using osu.Framework.Allocation;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Screens;
using osu.Game.Beatmaps;
@ -97,7 +97,6 @@ namespace osu.Game.Screens.Play
foreach (var frame in bundle.Frames)
{
IConvertibleReplayFrame convertibleFrame = GameplayState.Ruleset.CreateConvertibleReplayFrame()!;
Debug.Assert(convertibleFrame != null);
convertibleFrame.FromLegacy(frame, GameplayState.Beatmap);
var convertedFrame = (ReplayFrame)convertibleFrame;
@ -132,7 +131,8 @@ namespace osu.Game.Screens.Play
{
base.Dispose(isDisposing);
SpectatorClient.OnNewFrames -= userSentFrames;
if (SpectatorClient.IsNotNull())
SpectatorClient.OnNewFrames -= userSentFrames;
}
}
}