mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Purge final spectator frames before ending play
This commit is contained in:
@ -167,6 +167,9 @@ namespace osu.Game.Online.Spectator
|
||||
if (!IsPlaying)
|
||||
return;
|
||||
|
||||
if (pendingFrames.Count > 0)
|
||||
purgePendingFrames(true);
|
||||
|
||||
IsPlaying = false;
|
||||
currentBeatmap = null;
|
||||
|
||||
@ -238,9 +241,12 @@ namespace osu.Game.Online.Spectator
|
||||
purgePendingFrames();
|
||||
}
|
||||
|
||||
private void purgePendingFrames()
|
||||
private void purgePendingFrames(bool force = false)
|
||||
{
|
||||
if (lastSend?.IsCompleted == false)
|
||||
if (lastSend?.IsCompleted == false && !force)
|
||||
return;
|
||||
|
||||
if (pendingFrames.Count == 0)
|
||||
return;
|
||||
|
||||
var frames = pendingFrames.ToArray();
|
||||
|
Reference in New Issue
Block a user