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

Animated long notes start at frame 1 instead of 0 #28284

Closed
Luminatron opened this issue May 22, 2024 · 4 comments · Fixed by #28339
Closed

Animated long notes start at frame 1 instead of 0 #28284

Luminatron opened this issue May 22, 2024 · 4 comments · Fixed by #28339

Comments

@Luminatron
Copy link

Type

Game behaviour

Bug description

I imported my skin to Lazer. It's jarring coz there's a stark contrast with the only 2 frames my animated long notes have, and the first frame is dark for very important reasons, so I can read LN spam charts and identify when I'm actually holding a long note.

Screenshots or videos

files
oldbehaviour
newbehaviour

Version

2024.521.2-lazer

Logs

compressed-logs.zip

@smoogipoo
Copy link
Contributor

Please provide the skin.

@Luminatron
Copy link
Author

@bdach bdach self-assigned this May 28, 2024
@bdach
Copy link
Collaborator

bdach commented May 28, 2024

@Luminatron Did you encounter this in normal gameplay? The only scenario where I can make this happen is skipping forward in replays (which is still an issue, but I just wanna make sure I'm not missing anything).

@Luminatron
Copy link
Author

Just normal gameplay.

TextAdventurer12 pushed a commit to TextAdventurer12/osu that referenced this issue Jul 6, 2024
Hopefully closes ppy#28284.

As far as I can tell this is a somewhat difficult one to reproduce
because it relies on a specific set of circumstances (at least the
reproduction case that I found does). The reset to frame 0 would
previously be called explicitly when `isHitting` changed:

    https://github.com/ppy/osu/blob/182ca145c78432f4b832c8ea407e107dfeaaa8ad/osu.Game.Rulesets.Mania/Skinning/Legacy/LegacyBodyPiece.cs#L144

However, it can be the case that `bodyAnimation` is not loaded at the
point of this call. This is significant because
`SkinnableTextureAnimation` contains this logic:

    https://github.com/ppy/osu/blob/182ca145c78432f4b832c8ea407e107dfeaaa8ad/osu.Game/Skinning/LegacySkinExtensions.cs#L192-L211

which cannot be moved any earlier (because any earlier the `Clock` may
no longer be correct), and also causes the animation to be seeked
forward while it is stopped.

I can't figure out a decent way to layer this otherwise (by scheduling
or whatever), so this commit is just applying the nuclear option of just
seeking back to frame 0 on every update frame in which the body piece is
not being hit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants