Skip to content

Commit

Permalink
Fix nil indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
marchc1 committed Jan 12, 2025
1 parent e114808 commit 66f10d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/acf/core/utilities/util_cl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -941,14 +941,12 @@ end
do
local EntGizmoDifferences = {}


local COLOR_Black = Color(0, 0, 0, 255)
local COLOR_Link_OK = Color(55, 235, 55, 255)
local COLOR_Link_Fail = Color(255, 88, 88)
local COLOR_Link_FailDistMissed = Color(175, 0, 0)
local COLOR_Link = Color(205, 235, 255, 255)


function ACF.ToolCL_RegisterLinkGizmoData(from, to, callback)
EntGizmoDifferences[from] = EntGizmoDifferences[from] or {}
EntGizmoDifferences[to] = EntGizmoDifferences[to] or {}
Expand Down Expand Up @@ -1051,8 +1049,10 @@ do
local canLink, why, data = ACF.ToolCL_CanLink(ent, lookEnt, dist)
linkcolor = canLink and COLOR_Link_OK or COLOR_Link_Fail
local linkText = canLink and distTextOK or distTextNo:format(why.Text and why.Text or why)
renderOverride = why.Renderer
renderData = data
if not canLink then
renderOverride = why.Renderer
renderData = data
end
DrawText(linkText, linkcolor, inbetween)
else
DrawText(distText:format(dist), linkcolor, inbetween)
Expand Down

0 comments on commit 66f10d9

Please sign in to comment.