Simplify allowJoin()

This commit is contained in:
Lonsfor 2022-05-14 08:04:28 +02:00
parent 906444ae08
commit 89da89fbfe

View File

@ -297,16 +297,13 @@ end
function allowJoin(v) function allowJoin(v)
if not cv_interrupt.value then if not cv_interrupt.value then
local y
if v then if v then
y = "yes" COM_BufInsertText(server, "allowteamchange Yes")
hud.enable("freeplay") hud.enable("freeplay")
else else
y = "no" COM_BufInsertText(server, "allowteamchange No")
hud.disable("freeplay") hud.disable("freeplay")
end end
COM_BufInsertText(server, "allowteamchange " + y)
end end
end end