prevent netvar changes in replays

This commit is contained in:
Not 2022-04-30 15:50:23 +02:00
parent 5cecda05f1
commit 8a6161a1e1
1 changed files with 9 additions and 7 deletions

View File

@ -1264,13 +1264,15 @@ local function think()
p.afkTime = leveltime
end
if leveltime > PREVENT_JOIN_TIME and p.afkTime + AFK_TIMEOUT > leveltime then
if cv_teamchange.value then
allowJoin(false)
end
elseif p.afkTime + AFK_TIMEOUT < leveltime then
if not cv_teamchange.value then
allowJoin(true)
if not replayplayback then
if leveltime > PREVENT_JOIN_TIME and p.afkTime + AFK_TIMEOUT > leveltime then
if cv_teamchange.value then
allowJoin(false)
end
elseif p.afkTime + AFK_TIMEOUT < leveltime then
if not cv_teamchange.value then
allowJoin(true)
end
end
end