mirror of
https://github.com/ppy/osu
synced 2025-01-04 05:12:10 +00:00
Refactorings
This commit is contained in:
parent
c1766d8a41
commit
886d1d2df6
@ -160,7 +160,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
finish(SpectatingUserState.Failed);
|
finish(SpectatingUserState.Failed);
|
||||||
|
|
||||||
checkPaused(false); // Should continue playing until out of frames
|
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]
|
[Test]
|
||||||
|
@ -98,8 +98,8 @@ namespace osu.Game.Online.Spectator
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
watchingUserStates.Clear();
|
|
||||||
playingUsers.Clear();
|
playingUsers.Clear();
|
||||||
|
watchingUserStates.Clear();
|
||||||
}
|
}
|
||||||
}), true);
|
}), true);
|
||||||
}
|
}
|
||||||
|
@ -69,17 +69,17 @@ namespace osu.Game.Overlays.Dashboard
|
|||||||
{
|
{
|
||||||
var user = task.GetResultSafely();
|
var user = task.GetResultSafely();
|
||||||
|
|
||||||
if (user != null)
|
if (user == null)
|
||||||
{
|
return;
|
||||||
Schedule(() =>
|
|
||||||
{
|
|
||||||
// user may no longer be playing.
|
|
||||||
if (!playingUsers.Contains(user.Id))
|
|
||||||
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)
|
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)
|
if (state.State == SpectatingUserState.Passed || state.State == SpectatingUserState.Failed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Screens.Play
|
|||||||
public bool HasFailed { get; set; }
|
public bool HasFailed { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public bool HasQuit { get; set; }
|
public bool HasQuit { get; set; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user