OsuParsers icon indicating copy to clipboard operation
OsuParsers copied to clipboard

BpmMultiplier is inverted in MathHelper

Open dz-ss opened this issue 3 years ago • 3 comments

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

dz-ss avatar Jul 04 '21 00:07 dz-ss

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.

mrflashstudio avatar Jul 04 '21 08:07 mrflashstudio

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.

dz-ss avatar Jul 04 '21 13:07 dz-ss

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

mrflashstudio avatar Jul 04 '21 13:07 mrflashstudio