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

Limit distance snap to current time has broken behaviour when trying to re-snap at an earlier point than selected object(s) #31554

Open
hiderikzki opened this issue Jan 18, 2025 · 2 comments
Assignees
Labels
area:editor priority:1 Very important. Feels bad without fix. Affects the majority of users.

Comments

@hiderikzki
Copy link

Type

Game behaviour

Bug description

When trying to re-snap a placed object when using Limit distance snap to current time and being earlier in the timeline than the object being snapped, will result in very weird snapping behaviour.

When the setting is off everything works as expected, object doesn't move in timeline and also stays locked in the same correct snapping distance.

Screenshots or videos

2025-01-18.09-58-24.mp4

Version

v2025.101.0

Logs

compressed-logs.zip

@peppy peppy added area:editor priority:1 Very important. Feels bad without fix. Affects the majority of users. labels Jan 20, 2025
@bdach bdach self-assigned this Jan 20, 2025
@bdach
Copy link
Collaborator

bdach commented Jan 20, 2025

Root cause is reliance on current time in

? SnapProvider.DurationToDistance(ReferenceObject, editorClock.CurrentTime - ReferenceObject.GetEndTime())

I attempted to write a fix for this but it's so obscene I would not PR it in a million years. The structure is all wrong. Everything is overly abstracted. Fixing this requires giving the snap operation the actual objects it's snapping, and because the snapping is all abstracted to only be about position, you can't give the snap operation the actual context without slapping a bunch of generics all over. See branch at https://github.com/ppy/osu/compare/master...bdach:osu:this-sucks?expand=1.

Not sure I see any hope for a proper fix without just rewriting the entirety of grid snapping everywhere. @peppy thoughts? any advice?

@peppy
Copy link
Member

peppy commented Jan 20, 2025

I agree with a rewrite. It sounds like a large task but I'm pretty sure as with most stuff we've over-engineered, the rewrite will be fast and simpler than any other path forward.

Even as a starting point, it will feel more productive than trying to fix what we have.

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

No branches or pull requests

3 participants