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

Timing Selection goes back one when clicking on it. #21172

Closed
Vadeblade opened this issue Nov 8, 2022 · 4 comments
Closed

Timing Selection goes back one when clicking on it. #21172

Vadeblade opened this issue Nov 8, 2022 · 4 comments

Comments

@Vadeblade
Copy link

Type

Game behaviour

Bug description

Timing selection I pick goes to an earlier one when selecting it.

Screenshots or videos

2022-11-08.04-02-53.mp4

Version

2022.1101.0-lazer

Logs

runtime.log
updater.log
database.log
legacy-ipc.log
network.log
performance.log

@peppy
Copy link
Sponsor Member

peppy commented Nov 9, 2022

Could you please attach the beatmap you are testing with (or a link to it)?

This is likely going to be a floating point precision issue.

@Vadeblade
Copy link
Author

I've tried recreating the issue multiple times and couldn't do it. Immediately after I deleted most the timing points in the map after reporting since I need to for the timing of the song.

@peppy
Copy link
Sponsor Member

peppy commented Nov 17, 2022

I can imagine that this can definitely happen due to the trackActivePoint flow running...

private void trackActivePoint()
{
// For simplicity only match on the first type of the active control point.
if (selectedGroup.Value == null)
trackedType = null;
else
{
// If the selected group only has one control point, update the tracking type.
if (selectedGroup.Value.ControlPoints.Count == 1)
trackedType = selectedGroup.Value?.ControlPoints.Single().GetType();
// If the selected group has more than one control point, choose the first as the tracking type
// if we don't already have a singular tracked type.
else if (trackedType == null)
trackedType = selectedGroup.Value?.ControlPoints.FirstOrDefault()?.GetType();
}
if (trackedType != null)
{
// We don't have an efficient way of looking up groups currently, only individual point types.
// To improve the efficiency of this in the future, we should reconsider the overall structure of ControlPointInfo.
// Find the next group which has the same type as the selected one.
var found = Beatmap.ControlPointInfo.Groups
.Where(g => g.ControlPoints.Any(cp => cp.GetType() == trackedType))
.LastOrDefault(g => g.Time <= clock.CurrentTimeAccurate);
if (found != null)
selectedGroup.Value = found;
}
}

..at the same time a seek is performed, but will need a reliable repro case to figure out what is going on (the fact it's using clock.CurrentTimeAccurate should be enough in theory). If anyone happens to find one please leave more information.

@Joehuu
Copy link
Member

Joehuu commented Sep 20, 2024

Closing as the OP reproduced this on a custom beatmap and couldn't reproduce reliably after. Probably not an issue after #29532 anyway.

@Joehuu Joehuu closed this as completed Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants