mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 09:37:23 +08:00
Add flow for marking user as quit for further handling
This commit is contained in:
parent
ff57562956
commit
116acc2b5e
@ -93,6 +93,9 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
foreach (var userId in e.OldItems.OfType<int>())
|
foreach (var userId in e.OldItems.OfType<int>())
|
||||||
{
|
{
|
||||||
streamingClient.StopWatchingUser(userId);
|
streamingClient.StopWatchingUser(userId);
|
||||||
|
|
||||||
|
if (userScores.TryGetValue(userId, out var trackedData))
|
||||||
|
trackedData.MarkUserQuit();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -143,11 +146,19 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
private readonly BindableInt currentCombo = new BindableInt();
|
private readonly BindableInt currentCombo = new BindableInt();
|
||||||
|
|
||||||
|
public IBindable<bool> UserQuit => userQuit;
|
||||||
|
|
||||||
|
private readonly BindableBool userQuit = new BindableBool();
|
||||||
|
|
||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
public FrameHeader LastHeader;
|
public FrameHeader LastHeader;
|
||||||
|
|
||||||
|
public void MarkUserQuit() => userQuit.Value = true;
|
||||||
|
|
||||||
public void UpdateScore(ScoreProcessor processor, ScoringMode mode)
|
public void UpdateScore(ScoreProcessor processor, ScoringMode mode)
|
||||||
{
|
{
|
||||||
|
Debug.Assert(UserQuit.Value);
|
||||||
|
|
||||||
if (LastHeader == null)
|
if (LastHeader == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user