We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0242c6d commit 9436f26Copy full SHA for 9436f26
cl_ui3d2d.lua
@@ -62,9 +62,8 @@ end
62
do --Rendering context creation and mouse position getters
63
local localPlayer
64
65
- hook.Add("PreRender", "ui3d2d.getLocalPlayer", function() --Keep getting the local player until it's available
+ hook.Add("InitPostEntity", "ui3d2d.getLocalPlayer", function() --Store a reference to the local player once available
66
localPlayer = LocalPlayer()
67
- if IsValid(localPlayer) then hook.Remove("PreRender", "ui3d2d.getLocalPlayer") end
68
end)
69
70
local traceLine = util.TraceLine
0 commit comments