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

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