diff --git a/scripts/songselect/songwheel.lua b/scripts/songselect/songwheel.lua index 9e00822..be9f07b 100644 --- a/scripts/songselect/songwheel.lua +++ b/scripts/songselect/songwheel.lua @@ -631,6 +631,13 @@ function tickTransitions(deltaTime) end end + -- If the original songBpm is "2021.04.01" for example, the above code can produce `nil` in the songBpm + -- since it cannot parse the number out of that string. Here we implement a fallback, to not crash + -- USC on whacky charts. Whacky charters, quit using batshit insane bpm values. It makes me angery >:( + if (songBpm == nil) then + songBpm = 120; + end + transitionFlashScale = transitionFlashScale + deltaTime / (60/songBpm) -- transition should last for that time in seconds else transitionFlashScale = 0