Compare commits

..

2 Commits

Author SHA1 Message Date
Not
a840a5fa83 revert maploaded cvars 2022-08-24 16:18:24 +02:00
Not
bd5e3f24c6 add extra checks for spbattack 2022-08-23 17:10:10 +02:00

View File

@ -12,7 +12,6 @@ local splits = {}
local PATCH = nil
local help = true
local EncoreInitial = nil
local cv_teamchange
local scoreTable
@ -91,6 +90,10 @@ local ticsToTime
local allowJoin
---------------
-- cvars
local cv_teamchange
local cv_spbatk
local cv_gui = CV_RegisterVar({
name = "lb_gui",
defaultvalue = GUI_ON,
@ -1379,10 +1382,15 @@ 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)
if leveltime > START_TIME - (3 * TICRATE) / 2 and server.SPBArunning then
if server.SPBArunning
and cv_spbatk.value
and leveltime > START_TIME - (3 * TICRATE) / 2 then
Flags = $ | F_SPBATK
if server.SPBAexpert then
Flags = $ | F_SPBEXP
@ -1405,10 +1413,18 @@ local function think()
end
end
-- make sure the spb actually spawned
if leveltime == START_TIME - 1 then
if not (server.SPBAbomb and server.SPBAbomb.valid) then
-- it didn't spawn, clear spb flags
Flags = $ & !(F_SPBATK | F_SPBEXP | F_SPBBIG | F_SPBJUS)
end
if not (Flags & F_SPBATK) then
end
else
hud.enable("freeplay")
end
end
scoreTable = getScoreTable(gamemap, Flags)