mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 14:22:55 +08:00
Rewrite comment explaining early return on checkScoreCompleted
given new usages
This commit is contained in:
parent
b25a59fd14
commit
796cd9c916
@ -708,11 +708,13 @@ namespace osu.Game.Screens.Play
|
|||||||
if (!this.IsCurrentScreen())
|
if (!this.IsCurrentScreen())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Special case to handle rewinding post-completion. This is the only way already queued forward progress can be cancelled.
|
// Handle cases of arriving at this method when not in a completed state.
|
||||||
// TODO: Investigate whether this can be moved to a RewindablePlayer subclass or similar.
|
// - When a storyboard completion triggered this call earlier than gameplay finishes.
|
||||||
// Currently, even if this scenario is hit, prepareScoreForDisplay has already been queued (and potentially run).
|
// - When a replay has been rewound before a queued resultsDisplayDelegate has run.
|
||||||
// In scenarios where rewinding is possible (replay, spectating) this is a non-issue as no submission/import work is done,
|
//
|
||||||
// but it still doesn't feel right that this exists here.
|
// Currently, even if this scenario is hit, prepareAndImportScoreAsync has already been queued (and potentially run).
|
||||||
|
// In the scenarios above, this is a non-issue, but it still feels a bit convoluted to have to cancel in this method.
|
||||||
|
// Maybe this can be improved with further refactoring.
|
||||||
if (!ScoreProcessor.HasCompleted.Value)
|
if (!ScoreProcessor.HasCompleted.Value)
|
||||||
{
|
{
|
||||||
resultsDisplayDelegate?.Cancel();
|
resultsDisplayDelegate?.Cancel();
|
||||||
|
Loading…
Reference in New Issue
Block a user