mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Refactorings
This commit is contained in:
parent
c1766d8a41
commit
886d1d2df6
@ -160,7 +160,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
finish(SpectatingUserState.Failed);
|
||||
|
||||
checkPaused(false); // Should continue playing until out of frames
|
||||
checkPaused(true);
|
||||
checkPaused(true); // And eventually stop after running out of frames and fail.
|
||||
// Todo: Should check for + display a failed message.
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -98,8 +98,8 @@ namespace osu.Game.Online.Spectator
|
||||
}
|
||||
else
|
||||
{
|
||||
watchingUserStates.Clear();
|
||||
playingUsers.Clear();
|
||||
watchingUserStates.Clear();
|
||||
}
|
||||
}), true);
|
||||
}
|
||||
|
@ -69,17 +69,17 @@ namespace osu.Game.Overlays.Dashboard
|
||||
{
|
||||
var user = task.GetResultSafely();
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
Schedule(() =>
|
||||
{
|
||||
// user may no longer be playing.
|
||||
if (!playingUsers.Contains(user.Id))
|
||||
return;
|
||||
if (user == null)
|
||||
return;
|
||||
|
||||
userFlow.Add(createUserPanel(user));
|
||||
});
|
||||
}
|
||||
Schedule(() =>
|
||||
{
|
||||
// user may no longer be playing.
|
||||
if (!playingUsers.Contains(user.Id))
|
||||
return;
|
||||
|
||||
userFlow.Add(createUserPanel(user));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -216,6 +216,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
|
||||
protected override void EndGameplay(int userId, SpectatorState state)
|
||||
{
|
||||
// Allowed passed/failed users to complete their remaining replay frames.
|
||||
// The failed state isn't really possible in multiplayer (yet?) but is added here just for safety in case it starts being used.
|
||||
if (state.State == SpectatingUserState.Passed || state.State == SpectatingUserState.Failed)
|
||||
return;
|
||||
|
||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Screens.Play
|
||||
public bool HasFailed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the user quit gameplay without either having either passed or failed.
|
||||
/// Whether the user quit gameplay without having either passed or failed.
|
||||
/// </summary>
|
||||
public bool HasQuit { get; set; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user