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

Distance -> DistToSqr

This commit is contained in:
Hellss
2022-06-04 12:53:34 +03:00
parent 7383dcdd45
commit dfad20eec1
9 changed files with 10 additions and 10 deletions

View File

@@ -5,7 +5,7 @@ local function enableDebug()
if debug:GetBool() then
hook.Add("PostDrawTranslucentRenderables","MetrostroiAutoDebug",function(bDrawingDepth,bDrawingSkybox)
for _,ent in pairs(ents.FindByClass("gmod_track_autodrive_plate")) do
if bDrawingDepth and LocalPlayer():GetPos():Distance(sig:GetPos()) < 512 then
if bDrawingDepth and LocalPlayer():GetPos():DistToSqr(sig:GetPos()) < 262144 then
local pos = sig:LocalToWorld(Vector(0,0,0))
local ang = sig:LocalToWorldAngles(Angle(0,90,90))
cam.Start3D2D(pos, ang, 0.25)