2007-02-04 01:16:06 +00:00
|
|
|
|
|
|
|
ENT.Spawnable = false
|
|
|
|
ENT.AdminSpawnable = false
|
|
|
|
|
|
|
|
include('shared.lua')
|
2007-05-05 01:54:41 +00:00
|
|
|
|
|
|
|
--handle overlay text client side instead (TAD2020)
|
|
|
|
function ENT:Think()
|
|
|
|
self.BaseClass.Think(self)
|
|
|
|
|
|
|
|
local ang = self.Entity:GetAngles()
|
2007-05-05 05:03:52 +00:00
|
|
|
if (ang.p < 0 && !self:GetOut180()) then ang.p = ang.p + 360 end
|
|
|
|
if (ang.y < 0 && !self:GetOut180()) then ang.y = ang.y + 360 end
|
|
|
|
if (ang.r < 0 && !self:GetOut180()) then ang.r = ang.r + 360
|
2007-05-08 04:24:43 +00:00
|
|
|
elseif (ang.r > 180 && self:GetOut180()) then ang.r = ang.r - 360 end
|
2007-05-05 01:54:41 +00:00
|
|
|
self:ShowOutput(ang.p, ang.y, ang.r)
|
|
|
|
|
|
|
|
self.Entity:NextThink(CurTime()+0.04)
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
function ENT:ShowOutput(p, y, r)
|
2007-05-16 19:38:34 +00:00
|
|
|
--self.Entity:SetNetworkedString( "GModOverlayText", "Angles = " .. math.Round(p*1000)/1000 .. "," .. math.Round(y*1000)/1000 .. "," .. math.Round(r*1000)/1000 )
|
2007-05-05 01:54:41 +00:00
|
|
|
self.Entity:SetNetworkedBeamString( "GModOverlayText", "Angles = " .. math.Round(p*1000)/1000 .. "," .. math.Round(y*1000)/1000 .. "," .. math.Round(r*1000)/1000 )
|
2007-05-16 19:38:34 +00:00
|
|
|
//self.BaseClass.BaseClass.SetOverlayText(self, "Angles = " .. math.Round(p*1000)/1000 .. "," .. math.Round(y*1000)/1000 .. "," .. math.Round(r*1000)/1000 )
|
|
|
|
--self:SetOverlayText(self, "Angles = " .. math.Round(p*1000)/1000 .. "," .. math.Round(y*1000)/1000 .. "," .. math.Round(r*1000)/1000 )
|
|
|
|
--self.Txt = "Angles = " .. math.Round(p*1000)/1000 .. "," .. math.Round(y*1000)/1000 .. "," .. math.Round(r*1000)/1000
|
2007-05-05 01:54:41 +00:00
|
|
|
end
|