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
if clearcheats then
clearcheats = false
for p in players.iterate do
p.SPBAKARTBIG = false
p.SPBAjustice = false
p.SPBAshutup = false
for q in players.iterate do
q.SPBAKARTBIG = false
q.SPBAjustice = false
q.SPBAshutup = false
end
end
for p in players.iterate do
if not p.spectator then
if p.SPBAKARTBIG then
Flags = $ | F_SPBBIG
end
if p.SPBAjustice then
Flags = $ | F_SPBJUS
end
if p then
if p.SPBAKARTBIG then
Flags = $ | F_SPBBIG
end
if p.SPBAjustice then
Flags = $ | F_SPBJUS
end
end
end
if not (Flags & F_SPBATK) then
hud.enable("freeplay")