Ludicrous Speed: Fix reported PPS being higher than actual PPS
parent
93c221f33b
commit
2ba4a23ebf
|
@ -31,7 +31,7 @@ end
|
||||||
local function mean(t)
|
local function mean(t)
|
||||||
local sum = 0
|
local sum = 0
|
||||||
|
|
||||||
for _, v in ipairs(t) do
|
for _, v in pairs(t) do
|
||||||
sum = sum + v
|
sum = sum + v
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ function LudicrousSpeed:getDropSpeed() return 20 end
|
||||||
function LudicrousSpeed:getPPS()
|
function LudicrousSpeed:getPPS()
|
||||||
if #self.delays == 0 then return 0 end
|
if #self.delays == 0 then return 0 end
|
||||||
local delays = copy(self.delays)
|
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
|
return (mean(delays) / 60) ^ -1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -132,4 +132,4 @@ function LudicrousSpeed:getHighscoreData()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
return LudicrousSpeed
|
return LudicrousSpeed
|
||||||
|
|
Loading…
Reference in New Issue