diff --git a/leaderboard.lua b/leaderboard.lua index 99964f7..47b13dc 100644 --- a/leaderboard.lua +++ b/leaderboard.lua @@ -90,7 +90,7 @@ local ticsToTime local allowJoin --------------- --- maploaded cvars +-- cvars local cv_teamchange local cv_spbatk @@ -808,10 +808,6 @@ addHook("MapLoad", function() scrollAcc = 0 FlashTics = 0 - -- cvars - cv_teamchange = CV_FindVar("teamchange") - cv_spbatk = CV_FindVar("spbatk") - allowJoin(true) --printTable(lb) end @@ -1386,6 +1382,9 @@ local function think() end end end + if not cv_spbatk then + cv_spbatk = CV_FindVar("spbatk") + end -- Gamemode flags Flags = $ & !(F_SPBATK | F_SPBEXP | F_SPBBIG | F_SPBJUS) @@ -1430,6 +1429,10 @@ local function think() scoreTable = getScoreTable(gamemap, Flags) + if not cv_teamchange then + cv_teamchange = CV_FindVar("allowteamchange") + end + if p then -- Scroll controller -- Spectators can't input buttons so let the gamer do it