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 duplicate DifficultyControlPoints breaking slider velocities #1125

Merged

Conversation

swoolcock
Copy link
Contributor

When importing legacy beatmaps, it was possible to add two DifficultyControlPoints with different multipliers but the same time. Slider velocity calculation could sometimes take the wrong multiplier, causing the slider ball to move at the wrong speed.

Fix is to first remove any difficulty control points with the same time as the one about to be added, so that the latter lines in the file will take priority.

Fixes issue #1014

@@ -331,6 +332,7 @@ private void handleTimingPoints(Beatmap beatmap, string line)

if (speedMultiplier != difficultyPoint.SpeedMultiplier)
{
beatmap.ControlPointInfo.DifficultyPoints.RemoveAll(x => x.Time == time);

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

smoogipoo
smoogipoo previously approved these changes Aug 18, 2017
@smoogipoo smoogipoo merged commit 5c84dd1 into ppy:master Aug 18, 2017
@swoolcock swoolcock deleted the fix-duplicate-difficulty-control-points branch August 19, 2017 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants