@name SpiderBoat 3 E2
@inputs W S M1 M2 Alt Shift Space Reload Vec:vector
@inputs AdvPod:wirelink VecThrust:wirelink
@outputs Thrust Local W S M1 M2 Reload Space Shift Alt Mass
@outputs 
@persist Boat:entity Mass
@trigger 
@model models//props_combine/headcrabcannister01a_skybox.mdl

#W=AdvPod["W",number]
#S=AdvPod["S",number]
#M1=AdvPod["Mouse1",number]
#M2=AdvPod["Mouse2",number]
#Reload=AdvPod["R",number]
#Space=AdvPod["Space",number]
#Shift=AdvPod["Shift",number]
#Alt=AdvPod["Alt",number]
AdvPod:entity():setAlpha(0)

interval(30)
#if(first()|duped()){
#    entity():setAlpha(0)
#    E=entity():getConstraints()
#    E:pushEntity(entity())
#    for(C=1,E:count()){
#        Mass+=E[C,entity]:mass()
#        if(E[C,entity]:type()=="prop_vehicle_airboat"){
#            Boat=E[C,entity]
#        }
#        if(E[C,entity]:type():find("thruster")){
#            E[C,entity]:setMass(12)
#        }
#    }
#} 

Velocity=Boat:vel():length()
Num1=Vec:x()
Num2=Vec:y()
Num3=Vec:z()

M=599 
Mass=M
#M=Mass
M1=Reload
#Global = ((M * 600) / (183.6375*!M2))*!Reload
#Global = ((M * 600) / (50*!M2))*!Reload
Global = ((M * 600) / (Num3*!M2))*!Reload
Slow=Alt*0.1+Alt==0
#Fast=Shift*2.6+Shift==0
Fast=Shift*Num2+Shift==0
Jump=Space==0*-1+Space
Vel=(797.9*Slow*Fast)-Velocity
#Thrust=((40*(Vel/30)*(M/50)*(W-S)))
#Thrust=((40*(Vel/30)*(M/183.6375)*(W-S)))
Thrust=((40*(Vel/30)*(M/Num1)*(W-S)))
Local=(Jump* -((M * 600) /183.6375)*!M2)

VecThrust["Mul",number]=Global
VecThrust["Vector",vector]=vec(0,0,-1)
