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

BpmMultiplier is inverted in MathHelper #37

Open
dz-ss opened this issue Jul 4, 2021 · 3 comments
Open

BpmMultiplier is inverted in MathHelper #37

dz-ss opened this issue Jul 4, 2021 · 3 comments

Comments

@dz-ss
Copy link

dz-ss commented Jul 4, 2021

return Clamp((float)-timingPoint.BeatLength, 10, 1000) / 100f;
e.g. when beat length is -1000, bpm multiplier should be 0.1 instead of 10.

@mrflashstudio
Copy link
Owner

Have you actually faced any issues because of this? Fixing this would break endtime calculation. I understand that this implementation is unintuitive as hell and may be incorrect, but that's how it's been implemented in osu! for ages.

@dz-ss
Copy link
Author

dz-ss commented Jul 4, 2021

Not really an issue I guess, but like you said, it's very confusing when doing things involving beat length and bpm multiplier.

Sorry that I forgot to mention it originally but I meant to also adjust endtime calc for this. The way I did it was by removing the bpm multiplier from BeatLengthAt and adding a new method to beatmap to get the final slider velocity (100 * SliderMultiplier * BpmMultiplier).
int duration = (int)(pixelLength / beatmap.SliderVelocityAt(startTme) * repeats * beatmap.BeatLengthAt(startTime));

Don't know if that's a good way to do it but it made a lot more sense to me. And imo this would be helpful for anyone else that comes across this.

@mrflashstudio
Copy link
Owner

Thanks a lot, I'll take a look at it a bit later and will come back to you!

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

No branches or pull requests

2 participants