1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

Merge pull request #507 from metrostroi-repo/#10

#10 Distance -> DistToSqr
This commit is contained in:
CrIcKeT98
2022-07-12 02:19:19 +03:00
committed by GitHub
9 changed files with 10 additions and 10 deletions

View File

@@ -668,7 +668,7 @@ local function enableDebug()
if ent.ButtonMap ~= nil then
draw.NoTexture()
for kp,panel in pairs(ent.ButtonMap) do
if kp ~= "BaseClass" and LocalPlayer():GetPos():Distance(ent:LocalToWorld(panel.pos)) < 512 then
if kp ~= "BaseClass" and LocalPlayer():GetPos():DistToSqr(ent:LocalToWorld(panel.pos)) < 262144 then
ent:DrawOnPanel(kp,function()
surface.SetDrawColor(0,0,255)
if not ent:ShouldDrawPanel(kp) then surface.SetDrawColor(255,0,0) end