Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Actually fix largestGap crash on LOVE 11.4
Browse files Browse the repository at this point in the history
Co-Authored-By: Aetzon <107924805+FredZachary@users.noreply.github.com>
  • Loading branch information
ShamblesSM and FredZachary committed Feb 1, 2023
1 parent 99bbbe2 commit 12a4a4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SphereGroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,8 @@ function SphereGroup:matchAndDeleteEffect(position, effect)
score = score + (1000 * (self.sphereChain.combo - 1))
end
local gapbonus
local largestGap = gaps and math.max(unpack(gaps))
if #gaps > 0 then
local largestGap = math.max(unpack(gaps))
if largestGap and largestGap < 20 --[[or not preOct2012GapScoring]] then
gapbonus = math.ceil(((1-(largestGap-0.5)/9.5)*1000)*math.min(1, #gaps) / 10) * 10 -- interpolate from 100,000 pts at 0,5 ball gap to 0 at 10 ball gap
else
Expand Down

0 comments on commit 12a4a4b

Please sign in to comment.