Apply changes to GameplayCompleted from reviews

This commit is contained in:
Dan Balasescu 2021-12-24 21:58:20 +09:00
parent c6854b37c8
commit a43cc20ae2
3 changed files with 5 additions and 4 deletions

View File

@ -46,7 +46,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
return; return;
// If gameplay wasn't finished, then we have a simple path back to the idle state by aborting gameplay. // If gameplay wasn't finished, then we have a simple path back to the idle state by aborting gameplay.
if (!playerLoader.GameplayCompleted) if (!playerLoader.GameplayPassed)
{ {
client.AbortGameplay(); client.AbortGameplay();
return; return;

View File

@ -9,7 +9,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
{ {
public class MultiplayerPlayerLoader : PlayerLoader public class MultiplayerPlayerLoader : PlayerLoader
{ {
public bool GameplayCompleted => player?.GameplayCompleted == true; public bool GameplayPassed => player?.GameplayPassed == true;
private Player player; private Player player;

View File

@ -69,7 +69,7 @@ namespace osu.Game.Screens.Play
/// <summary> /// <summary>
/// Whether gameplay has completed without the user having failed. /// Whether gameplay has completed without the user having failed.
/// </summary> /// </summary>
public bool GameplayCompleted { get; private set; } public bool GameplayPassed { get; private set; }
public Action RestartRequested; public Action RestartRequested;
@ -671,6 +671,7 @@ namespace osu.Game.Screens.Play
resultsDisplayDelegate?.Cancel(); resultsDisplayDelegate?.Cancel();
resultsDisplayDelegate = null; resultsDisplayDelegate = null;
GameplayPassed = false;
ValidForResume = true; ValidForResume = true;
skipOutroOverlay.Hide(); skipOutroOverlay.Hide();
return; return;
@ -680,7 +681,7 @@ namespace osu.Game.Screens.Play
if (HealthProcessor.HasFailed) if (HealthProcessor.HasFailed)
return; return;
GameplayCompleted = true; GameplayPassed = true;
// Setting this early in the process means that even if something were to go wrong in the order of events following, there // Setting this early in the process means that even if something were to go wrong in the order of events following, there
// is no chance that a user could return to the (already completed) Player instance from a child screen. // is no chance that a user could return to the (already completed) Player instance from a child screen.