53 lines
923 B
Lua
53 lines
923 B
Lua
|
ENT.Type = "anim"
|
||
|
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
|
||
|
|
||
|
ENT.m_NoNailUnfreeze = true
|
||
|
ENT.NoNails = true
|
||
|
|
||
|
ENT.CanPackUp = true
|
||
|
|
||
|
ENT.IsBarricadeObject = true
|
||
|
ENT.AlwaysGhostable = true
|
||
|
|
||
|
function ENT:SetObjectHealth(health)
|
||
|
self:SetDTFloat(0, health)
|
||
|
|
||
|
if health <= 0 and not self.Destroyed then
|
||
|
self.Destroyed = true
|
||
|
end
|
||
|
end
|
||
|
|
||
|
function ENT:GetObjectHealth()
|
||
|
return self:GetDTFloat(0)
|
||
|
end
|
||
|
|
||
|
function ENT:SetMaxObjectHealth(health)
|
||
|
self:SetDTFloat(1, health)
|
||
|
end
|
||
|
|
||
|
function ENT:GetMaxObjectHealth()
|
||
|
return self:GetDTFloat(1)
|
||
|
end
|
||
|
|
||
|
function ENT:SetObjectOwner(ent)
|
||
|
self:SetDTEntity(0, ent)
|
||
|
end
|
||
|
|
||
|
function ENT:GetObjectOwner()
|
||
|
return self:GetDTEntity(0)
|
||
|
end
|
||
|
|
||
|
function ENT:ClearObjectOwner()
|
||
|
self:SetObjectOwner(NULL)
|
||
|
end
|
||
|
|
||
|
function ENT:GetSpotLightPos()
|
||
|
return self:LocalToWorld(Vector(-2, 0, 15))
|
||
|
end
|
||
|
|
||
|
function ENT:GetSpotLightAngles()
|
||
|
local ang = self:GetAngles()
|
||
|
ang:RotateAroundAxis(ang:Up(), 180)
|
||
|
return ang
|
||
|
end
|