Fix initial play state not being kept locally if not connected

This commit is contained in:
Dean Herbert 2020-10-22 19:30:07 +09:00
parent 04f46bc1f8
commit 147d502da1

View File

@ -161,8 +161,6 @@ namespace osu.Game.Online.Spectator
public void BeginPlaying()
{
if (!isConnected) return;
if (isPlaying)
throw new InvalidOperationException($"Cannot invoke {nameof(BeginPlaying)} when already playing");
@ -179,6 +177,8 @@ namespace osu.Game.Online.Spectator
{
Debug.Assert(isPlaying);
if (!isConnected) return;
connection.SendAsync(nameof(ISpectatorServer.BeginPlaySession), currentState);
}