Simplify allowJoin()

This commit is contained in:
Lonsfor 2022-05-14 08:04:28 +02:00
parent 906444ae08
commit 89da89fbfe
1 changed files with 2 additions and 5 deletions

View File

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