Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor Test Play never exits when starting from a different time #17395

Closed
LeNitrous opened this issue Mar 21, 2022 · 4 comments · Fixed by #26465
Closed

Editor Test Play never exits when starting from a different time #17395

LeNitrous opened this issue Mar 21, 2022 · 4 comments · Fixed by #26465
Labels
area:editor priority:1 Very important. Feels bad without fix. Affects the majority of users.

Comments

@LeNitrous
Copy link
Contributor

Type

Game behaviour

Bug description

  • Reproduction Steps:

    • Open any beatmap in editor
    • Advance the time to any time greater than the first hit object
    • Open test play and complete the beatmap
  • Cause:

    • This is because EditorPlayer relies on ScoreProcessor.HasCompleted to check whether a map has been completed or not. However, the check works if all hit objects have been judged and this is never true for the case when the beatmap starts at a different time.
hasCompleted.Value =
    JudgedHits == MaxHits
    && (JudgedHits == 0
        // Last applied result is guaranteed to be non-null when JudgedHits > 0.
        || lastAppliedResult.AsNonNull().TimeAbsolute < Clock.CurrentTime);

Screenshots or videos

osu._z3NeWZundY.mp4

Version

2022.319.0

Logs

N/A

@peppy
Copy link
Member

peppy commented Mar 22, 2022

This is a weird one, because somehow SpectatorPlayer manages to avoid the issue, but I can't immediately find the logic making it work there..

@peppy peppy added the priority:1 Very important. Feels bad without fix. Affects the majority of users. label Mar 22, 2022
@bdach
Copy link
Collaborator

bdach commented Mar 22, 2022

I'm guessing that spectator player exit is driven by EndPlaying() calls rather than beatmap completion.

@peppy
Copy link
Member

peppy commented Mar 22, 2022

Is what I thought, but I couldn't immediately find this flow. It looks to be relying on the same bindable as mentioned in this thread and works as expected. I have a feeling hitobjects are getting results populated somewhere.

@smoogipoo
Copy link
Contributor

In spectator, ScoreProcessor gets replay frames applied to it which updates JudgedHits:

case ReplayStatisticsFrameEvent statisticsStateChangeEvent:
scoreProcessor?.ResetFromReplayFrame(ruleset, statisticsStateChangeEvent.Frame);
break;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editor priority:1 Very important. Feels bad without fix. Affects the majority of users.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants