+ fallback bpm if songbpm cannot be parsed
This commit is contained in:
parent
8cc36bdc4a
commit
e916f2294e
|
@ -631,6 +631,13 @@ function tickTransitions(deltaTime)
|
||||||
end
|
end
|
||||||
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
|
transitionFlashScale = transitionFlashScale + deltaTime / (60/songBpm) -- transition should last for that time in seconds
|
||||||
else
|
else
|
||||||
transitionFlashScale = 0
|
transitionFlashScale = 0
|
||||||
|
|
Loading…
Reference in New Issue