2008-06-14 00:55:20 +00:00
|
|
|
|
|
|
|
AddCSLuaFile( "cl_init.lua" )
|
|
|
|
AddCSLuaFile( "shared.lua" )
|
|
|
|
|
|
|
|
include('shared.lua')
|
|
|
|
|
|
|
|
ENT.WireDebugName = "Laser Receiver"
|
|
|
|
|
|
|
|
local MODEL = Model("models/jaanus/wiretool/wiretool_range.mdl")
|
|
|
|
|
|
|
|
function ENT:Initialize()
|
|
|
|
self.Entity:SetModel( MODEL )
|
|
|
|
self.Entity:PhysicsInit( SOLID_VPHYSICS )
|
|
|
|
self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
|
|
|
|
self.Entity:SetSolid( SOLID_VPHYSICS )
|
|
|
|
self.Outputs = Wire_CreateOutputs(self.Entity,{"X","Y","Z","Active"})
|
|
|
|
self.VPos = Vector(0,0,0)
|
|
|
|
end
|
|
|
|
|
|
|
|
function ENT:OnRemove()
|
|
|
|
Wire_Remove(self.Entity)
|
|
|
|
end
|
|
|
|
|
|
|
|
function ENT:Setup()
|
|
|
|
end
|
|
|
|
|
|
|
|
function ENT:GetBeaconPos(sensor)
|
|
|
|
return self.VPos
|
|
|
|
end
|
|
|
|
|
|
|
|
function ENT:ShowOutput(value)
|
|
|
|
if (value ~= self.PrevOutput) then
|
|
|
|
self:SetOverlayText( "Laser Receiver" )
|
|
|
|
self.PrevOutput = value
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function ENT:OnRestore()
|
|
|
|
Wire_Restored(self.Entity)
|
|
|
|
end
|
|
|
|
|