@name MALAT
@inputs XY:vector2 Gun:wirelink On
@outputs T HF HA Pos:vector Parent:entity Ang:angle 
@persist 
@trigger 
@model models/props_lab/huladoll.mdl
#Mouse Aimed Low Accuracy Turret
#By Captain Maim STEAM_0:1:8017844 
#T=Thrusters HF=Hydraulic Foward HA=Hydraulic Aft
#X=eyepod X, Y=eye pod Y
#shoot this onto the gun turret
X=XY:x()
Y=XY:y()
R=40 #range of movment
XSen=2.0 #X Axis sensitivity
YSen=0.5 #Y Axis sentitivity
T=-X*XSen #Make this negative if you put the thrusters on wrong
Pos=Gun:entity():pos()+vec(0,0,5)
Parent=Gun:entity()
Ang=Gun:entity():angles()
if(first()){
    Height=33.89351
HF=HA=Height
}


H=clamp(Y*YSen,-R,R)
HF+=H
HA-=H
HF=clamp(HF,Height-R,Height+R)
HA=clamp(HA,Height-R,Height+R)


####"Laser" sight
#
#Object = Gun:entity():pos() + Gun:entity():forward()
#Aim = Gun:entity():forward()
#Ranger = rangerOffset(500000,Object,Aim)
#XYZ = Ranger:position()

####End Laser Sight
