; Get the plane
_plane = _this select 0

; Locality check
?(!local _plane) : exit

#MainLoop
; We can get out when the plane dies
?(!alive _plane) : exit

~.03

; Check the gear status
_gearphase = _plane animationphase "RightGear"

?(_gearphase > 0) : goto "MainLoop"

_spinphase = _plane animationphase "SWF"

_delta = (speed _plane) / 300
?(_delta > .1): _delta = .1
_spinphase = _spinphase + _delta

?(_spinphase > 1) : _spinphase =0

_plane animate["SWF", _spinphase]
_plane animate["SWR", _spinphase]

goto "MainLoop"