From fea0895f16291ae47507fe5c38e8d49381a12701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sat, 17 Dec 2022 21:08:11 +0100 Subject: [PATCH] Call spectator `EndPlaying()` immediately after score submission As it turns out, in current `master`, if a gameplay session ends normally (i.e. by the player completing the beatmap in full), then the spectator server `EndPlaying()` method will not be called until `SubmittingPlayer.OnExiting()`, which in practice turns out to be the moment where the user exits from the post-gameplay results screen back to song select. There is seemingly no reasonable cause for not calling this earlier. In fact the solo spectator flow looks more broken without this call than with, because without it the spectator view just hangs until the spectated player exits gameplay, and *only then* shows results, rather than do it upon normal gameplay completion. --- osu.Game/Screens/Play/SubmittingPlayer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Screens/Play/SubmittingPlayer.cs b/osu.Game/Screens/Play/SubmittingPlayer.cs index 4c507f8c67..1eec71f33a 100644 --- a/osu.Game/Screens/Play/SubmittingPlayer.cs +++ b/osu.Game/Screens/Play/SubmittingPlayer.cs @@ -130,6 +130,7 @@ namespace osu.Game.Screens.Play score.ScoreInfo.Date = DateTimeOffset.Now; await submitScore(score).ConfigureAwait(false); + spectatorClient.EndPlaying(GameplayState); } [Resolved]