dobrograd-13-06-2022/octolib/addon/lua/entities/collider/cl_init.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

19 lines
433 B
Lua

include 'shared.lua'
local show = CreateClientConVar('octolib_showcolliders', '0', false)
function ENT:Draw()
if not show:GetBool() then return end
local col = self:GetNetVar('collider')
if not col then return end
if col[1] == 'model' then
self:DrawModel()
elseif col[1] == 'box' then
local mins, maxs = unpack(col[2])
render.DrawWireframeBox(self:GetPos(), self:GetAngles(), mins, maxs, color_white, true)
end
end