xyonico / BeatSaberSongLoader

A plugin for adding custom songs into Beat Saber
MIT License
238 stars 38 forks source link

Incorect handling of BPM #17

Closed texel-sensei closed 6 years ago

texel-sensei commented 6 years ago

Some songs that worked before the update do no longer work now, the BPM setting is incorrect.

The bug only happens with songs that record a fractional value for _beatsPerMinute. The decimal point is ignored and so the number is way too big (e.g. the song rasputin has BPM of 152.39999389648438 and is ingame reported as 1.52E16, so all notes play at once). Removing the fractional part makes the song play like normal again. The _beatsPerMinute value I changed was in the Hard.json file of the song. info.json contains a beatsPerMinute value of 149.

Tested with version 4.2

xyonico commented 6 years ago

This has been fixed with this commit https://github.com/xyonico/BeatSaberSongLoader/commit/7af0d1f4419defb5f3fa13d8baea349b99c084c0

The problem was I wasn't stating a specific culture when converting the text to number, so for some system languages a decimal is separated with commas instead of periods.

I'll close this issue when the release is out.

xyonico commented 6 years ago

This is been fixed with this release: https://github.com/xyonico/BeatSaberSongLoader/releases/tag/v4.2.2