fixed the fucking shapedrawer, sorry =)

This commit is contained in:
Jonny_Bro (Nikita) 2023-09-15 21:56:36 +05:00
parent f0617bd0ac
commit 8446ec37b5

View file

@ -85,9 +85,9 @@ end
hook.Add("PostDrawTranslucentRenderables", "ShapeGun", function() hook.Add("PostDrawTranslucentRenderables", "ShapeGun", function()
local ply = Entity(1) local ply = Entity(1)
local wep = ply:GetActiveWeapon() local wep = ply:GetActiveWeapon()
local isShapeDrawer = wep:GetClass() == "shapedrawer" local isShapeDrawer = IsValid(wep) and wep:GetClass() == "shapedrawer"
if IsValid(ply) and IsValid(wep) and isShapeDrawer then if IsValid(ply) and isShapeDrawer then
for _, v in ipairs(wep.points) do for _, v in ipairs(wep.points) do
render.DrawWireframeBox(v, angle_zero, Vector(-1, -1, -1), Vector(1, 1, 1)) render.DrawWireframeBox(v, angle_zero, Vector(-1, -1, -1), Vector(1, 1, 1))
end end