@name Robotboy655's Wire Tool: Ranger
@inputs MaxRange HitWater IgnoreWorld DefaultZero
@outputs Distance Position:vector Pos_X Pos_Y Pos_Z Velocity:vector Velocity_X Velocity_Y Velocity_Z Angles:angle Angles_Pitch Angles_Yaw Angles_Roll Color_Red Color_Green Color_Blue Color_Alpha SteamID:string EntityID Entity:entity Hit HitNormal:vector HitNormal_X HitNormal_Y HitNormal_Z
@model models/jaanus/wiretool/wiretool_range.mdl

interval(10)

if(first())
{
    holoCreate(0)
    holoScaleUnits(0,vec(1,1,1))
    holoParent(0,entity())
}

rangerHitWater(HitWater)
rangerIgnoreWorld(IgnoreWorld)
rangerDefaultZero(DefaultZero)

Ranger = ranger(MaxRange)
Distance = Ranger:distance()
Position = Ranger:position()
Entity = Ranger:entity()
Hit = Ranger:hit()
HitNormal = Ranger:hitNormal()
HitNormal_X = HitNormal:x()
HitNormal_Y = HitNormal:y()
HitNormal_Z = HitNormal:z()
Pos_X = Position:x()
Pos_Y = Position:y()
Pos_Z = Position:z()
Velocity = Entity:vel()
Velocity_X = Velocity:x()
Velocity_Y = Velocity:y()
Velocity_Z = Velocity:z()
Angles = Entity:angles()
Angles_Pitch = Angles:pitch()
Angles_Yaw = Angles:yaw()
Angles_Roll = Angles:roll()
Color = Entity:getColor4()
Color_Red = Color:x()
Color_Green = Color:y()
Color_Blue = Color:z()
Color_Alpha = Color:w()
SteamID = Entity:steamID()
EntityID = Entity:id()

if(Distance != MaxRange)
{
    Range = Distance
}
else
{
    Range = MaxRange
}

holoPos(0,entity():pos() + entity():up() * Range)
holoAng(0,entity():angles())
