2 Commits

Author SHA1 Message Date
Not
6244847b81 fix ranking numbers x offset for 10, 100 2022-03-28 13:19:50 +02:00
Not
f53a6ba91f v1.2.17_hf 2022-03-28 13:16:00 +02:00

View File

@ -121,7 +121,7 @@ local function getScoreTable(map, flags)
--return id
local mode = flags & F_SPBATK
return lb[mode] and lb[mode][map] or {}
return lb[mode] and lb[mode][map] or nil
end
local function score_t(map, name, skin, color, time, splits, flags, restat)
@ -171,7 +171,7 @@ if f then
flags = tonumber(t[7])
end
local scoreTable = getScoreTable(tonumber(t[1]), flags)
local scoreTable = getScoreTable(tonumber(t[1]), flags) or {}
local spl = {}
if t[6] != nil then
@ -766,10 +766,10 @@ local function drawScroll(v, player, scoreTable, gui)
end
local x = 10
if #scoreTable > 10 then
if #scoreTable >= 10 then
x = x + 8
end
if #scoreTable > 100 then
if #scoreTable >= 100 then
x = x + 8
end
@ -865,7 +865,7 @@ end
-- Find location of player and scroll to it
function scroll_to(player)
local m = getScoreTable(gamemap, Flags)
local m = getScoreTable(gamemap, Flags) or {}
scrollToPos = 2
for pos, score in ipairs(m) do
@ -879,7 +879,7 @@ function scroll_to(player)
end
local function saveTime(player)
local scoreTable = getScoreTable(gamemap, Flags)
local scoreTable = getScoreTable(gamemap, Flags) or {}
local newscore = score_t(
gamemap,