From c566a2795d3c0db97b442d6d34294c44ad94d9f2 Mon Sep 17 00:00:00 2001 From: "LegAz 2.0" <100089643+offlegaz2@users.noreply.github.com> Date: Sun, 13 Nov 2022 18:14:22 +0300 Subject: [PATCH] Fix "ixCheckTargetEntity" timer always treating ENT:OnShouldPopulateEntityInfo result as true --- gamemode/core/hooks/cl_hooks.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gamemode/core/hooks/cl_hooks.lua b/gamemode/core/hooks/cl_hooks.lua index 31a575d78..d6fe7073d 100644 --- a/gamemode/core/hooks/cl_hooks.lua +++ b/gamemode/core/hooks/cl_hooks.lua @@ -523,7 +523,11 @@ do local panel = ix.gui.entityInfo local bShouldShow = time >= aimTime and (!IsValid(ix.gui.menu) or ix.gui.menu.bClosing) and (!IsValid(ix.gui.characterMenu) or ix.gui.characterMenu.bClosing) - local bShouldPopulate = lastEntity.OnShouldPopulateEntityInfo and lastEntity:OnShouldPopulateEntityInfo() or true + local bShouldPopulate = true + + if (lastEntity.OnShouldPopulateEntityInfo) then + bShouldPopulate = lastEntity:OnShouldPopulateEntityInfo() + end if (bShouldShow and IsValid(lastEntity) and hookRun("ShouldPopulateEntityInfo", lastEntity) != false and (lastEntity.PopulateEntityInfo or bShouldPopulate)) then