Skip to content

Commit

Permalink
Don't use realtime updates on multi gameplay leaderboard
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Dec 1, 2018
1 parent 8567964 commit 498fe44
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ for i = 1, NUM_ENTRIES - 1 do
scoreboard[i] = onlineScores[i]
end
local done = false
for i = 1, NUM_ENTRIES do
if not done and not scoreboard[i] then
scoreboard[i] = curScore
done = true
if not isMulti then
for i = 1, NUM_ENTRIES do
if not done and not scoreboard[i] then
scoreboard[i] = curScore
done = true
end
end
end
table.sort(scoreboard, sortFunction)
Expand Down Expand Up @@ -276,7 +278,9 @@ t.OnCommand = function(self, params)
self:zoomtoheight(MovableValues.LeaderboardHeight)
for i, entry in ipairs(entryActors) do
for name, label in pairs(entry) do
label:visible(not (not scoreboard[i]:GetDisplayName()))
if scoreboard[i] ~= nil then
label:visible(not (not scoreboard[i]:GetDisplayName()))
end
end
end
end
Expand Down

0 comments on commit 498fe44

Please sign in to comment.