include('shared.lua')

/*---------------------------------------------------------
   Name: Initialize
---------------------------------------------------------*/
function ENT:Initialize()
end

/*---------------------------------------------------------
   Name: ENT:Draw()
---------------------------------------------------------*/
function ENT:Draw()

    self.Entity:DrawModel()
   
	local Ang = LocalPlayer():EyeAngles()
	
	Ang:RotateAroundAxis( Ang:Forward(), 90 )
	Ang:RotateAroundAxis( Ang:Right(), 90 )

	local Alpha = math.sin( CurTime() * 5 ) * 255
	
    if (CLIENT) then
	    surface.CreateFont("coolvetica", 20, 400, false, false, "LeeroysAmmoFont2")
	    surface.SetFont("LeeroysAmmoFont2")
        cam.Start3D2D( self.Entity:GetPos() + Vector(0,0,15), Ang, 0.24 )
        draw.DrawText(self.Entity.PrintName, "LeeroysAmmoFont2", 0, 0, Color(255, 255, 255, Alpha), TEXT_ALIGN_CENTER )
        cam.End3D2D()
        cam.Start3D2D( self.Entity:GetPos() + Vector(0,0,15), Ang, 0.24 )
        draw.DrawText(self.Entity.PrintName, "LeeroysAmmoFont2", 0, 0, Color(255, 255, 255, Alpha), TEXT_ALIGN_CENTER )
        cam.End3D2D()
    end
    
end