mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:03:13 +08:00
Merge pull request #25264 from bdach/quick-retry-f-rank
Fix quick retry immediately after completion marking score as failed
This commit is contained in:
commit
4ed30342db
@ -247,6 +247,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddStep("end spectator before retry", () => Game.SpectatorClient.EndPlaying(player.GameplayState));
|
||||
|
||||
AddStep("attempt to retry", () => player.ChildrenOfType<HotkeyRetryOverlay>().First().Action());
|
||||
AddAssert("old player score marked failed", () => player.Score.ScoreInfo.Rank, () => Is.EqualTo(ScoreRank.F));
|
||||
AddUntilStep("wait for old player gone", () => Game.ScreenStack.CurrentScreen != player);
|
||||
|
||||
AddUntilStep("get new player", () => (player = Game.ScreenStack.CurrentScreen as Player) != null);
|
||||
@ -259,6 +260,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
var getOriginalPlayer = playToCompletion();
|
||||
|
||||
AddStep("attempt to retry", () => getOriginalPlayer().ChildrenOfType<HotkeyRetryOverlay>().First().Action());
|
||||
AddAssert("original play isn't failed", () => getOriginalPlayer().Score.ScoreInfo.Rank, () => Is.Not.EqualTo(ScoreRank.F));
|
||||
AddUntilStep("wait for player", () => Game.ScreenStack.CurrentScreen != getOriginalPlayer() && Game.ScreenStack.CurrentScreen is Player);
|
||||
}
|
||||
|
||||
|
@ -1110,13 +1110,14 @@ namespace osu.Game.Screens.Play
|
||||
failAnimationContainer?.Stop();
|
||||
PauseOverlay?.StopAllSamples();
|
||||
|
||||
if (LoadedBeatmapSuccessfully)
|
||||
if (LoadedBeatmapSuccessfully && !GameplayState.HasPassed)
|
||||
{
|
||||
if (!GameplayState.HasPassed && !GameplayState.HasFailed)
|
||||
Debug.Assert(resultsDisplayDelegate == null);
|
||||
|
||||
if (!GameplayState.HasFailed)
|
||||
GameplayState.HasQuit = true;
|
||||
|
||||
// if arriving here and the results screen preparation task hasn't run, it's safe to say the user has not completed the beatmap.
|
||||
if (prepareScoreForDisplayTask == null && DrawableRuleset.ReplayScore == null)
|
||||
if (DrawableRuleset.ReplayScore == null)
|
||||
ScoreProcessor.FailScore(Score.ScoreInfo);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user