From eeec883c297ff51c5f1592f4895255ec6cf9f738 Mon Sep 17 00:00:00 2001 From: SticklyMan Date: Sat, 9 Mar 2024 20:02:38 -0700 Subject: [PATCH] Micro-optimization to replace player.GetAll() with player.Iterator in the Invis hook think --- lua/ulib/server/player.lua | 3 +-- ulib.build | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/ulib/server/player.lua b/lua/ulib/server/player.lua index 0dc1246..bd8d8e5 100644 --- a/lua/ulib/server/player.lua +++ b/lua/ulib/server/player.lua @@ -112,9 +112,8 @@ end local function doInvis() - local players = player.GetAll() local remove = true - for _, player in ipairs( players ) do + for _, player in player.Iterator() do local t = player:GetTable() if t.invis then remove = false diff --git a/ulib.build b/ulib.build index a73ebef..1188f8e 100644 --- a/ulib.build +++ b/ulib.build @@ -1 +1 @@ -1708618372 +1710039758