revert maploaded cvars

This commit is contained in:
Not 2022-08-24 16:18:24 +02:00
parent bd5e3f24c6
commit a840a5fa83
1 changed files with 8 additions and 5 deletions

View File

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