dont do an iteration when the player is already known

This commit is contained in:
Lonsfor 2022-04-30 22:56:19 +02:00
parent 5080672f7a
commit 14f8769d93

View File

@ -1220,22 +1220,22 @@ local function think()
end end
if clearcheats then if clearcheats then
clearcheats = false clearcheats = false
for p in players.iterate do for q in players.iterate do
p.SPBAKARTBIG = false q.SPBAKARTBIG = false
p.SPBAjustice = false q.SPBAjustice = false
p.SPBAshutup = false q.SPBAshutup = false
end end
end end
for p in players.iterate do
if not p.spectator then if p then
if p.SPBAKARTBIG then if p.SPBAKARTBIG then
Flags = $ | F_SPBBIG Flags = $ | F_SPBBIG
end end
if p.SPBAjustice then if p.SPBAjustice then
Flags = $ | F_SPBJUS Flags = $ | F_SPBJUS
end
end end
end end
end end
if not (Flags & F_SPBATK) then if not (Flags & F_SPBATK) then
hud.enable("freeplay") hud.enable("freeplay")