mirror of
https://github.com/SashLilac/cambridge-modpack.git
synced 2024-11-21 20:49:02 -06:00
Ludicrous Speed: Fix reported PPS being higher than actual PPS
This commit is contained in:
parent
93c221f33b
commit
2ba4a23ebf
@ -31,7 +31,7 @@ end
|
||||
local function mean(t)
|
||||
local sum = 0
|
||||
|
||||
for _, v in ipairs(t) do
|
||||
for _, v in pairs(t) do
|
||||
sum = sum + v
|
||||
end
|
||||
|
||||
@ -55,7 +55,7 @@ function LudicrousSpeed:getDropSpeed() return 20 end
|
||||
function LudicrousSpeed:getPPS()
|
||||
if #self.delays == 0 then return 0 end
|
||||
local delays = copy(self.delays)
|
||||
delays[#delays + 1] = self.frames - self.last_piece
|
||||
delays[0] = self.frames - self.last_piece
|
||||
return (mean(delays) / 60) ^ -1
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user