Dont iterate players if afk is disabled

This commit is contained in:
Lonsfor 2022-04-30 21:30:34 +02:00
parent e3c870eefd
commit 5790a3c020
1 changed files with 21 additions and 19 deletions

View File

@ -1146,7 +1146,8 @@ local function think()
end
if disable then
if cv_afk.value and ingame() > 1 then
if cv_afk.value then
if ingame() > 1 then
for p in players.iterate do
if p.valid and not p.spectator and not p.exiting and p.lives > 0 then
if p.cmd.buttons then
@ -1171,6 +1172,7 @@ local function think()
end
end
end
end
help = true
return