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

Fix osu!mania beat snap grid sometimes not displaying correctly #25073

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

peppy
Copy link
Member

@peppy peppy commented Oct 10, 2023

I'm not sure what the cause of the issue is, but I'm also not sure why it wasn't using DrawablePool (was it not around back then?).

Either way, switching to a proper pool fixes things just fine.

Resolves #25009.

I'm not sure what the cause of the issue is, but I'm also not sure why
it wasn't using `DrawablePool` (was it not around back then?).

Either way, switching to a proper pool fixes things just fine.

Resolves ppy#25009.
@peppy peppy force-pushed the mania-beat-snap-grid-fix branch from 0287ece to 1a60d6a Compare October 10, 2023 04:36
@bdach
Copy link
Collaborator

bdach commented Oct 10, 2023

The cause of the issue is lifetimes not being properly reset on DHO reuse. While this line:

line.HitObject.StartTime = time;

would correctly update LifetimeStart based on HitObjectEntryManager logic, the following logic was not re-ran:

protected override void UpdateInitialTransforms()
{
// don't perform any fading – we are handling that ourselves.
LifetimeEnd = HitObject.StartTime + visible_range;
}

causing reused objects to keep stale LifetimeEnd and as such disappearing into the void when scrolled far enough.

In that light, this fix is fine, because hitobject application calls onDefaultsApplied(), which calls updateState(), which calls UpdateInitialTransforms().

@bdach bdach merged commit 6b38600 into ppy:master Oct 10, 2023
@peppy peppy deleted the mania-beat-snap-grid-fix branch October 10, 2023 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gradient effect on the lines in the mania editor causes lines to disappear
2 participants