function JetEngineImage2::onDone(%this,%obj,%slot)
{
%obj.unMountImage(%slot);
}
function JetEngineCheck(%obj)
{
// return;
if(!isObject(%obj))
return;
%speed = vectorLen(%obj.getVelocity());
if(%speed < %obj.dataBlock.minJetEngineSpeed)
{
if(%obj.getMountedImage(0) !$= "")
{
%obj.unMountImage(0);
// %obj.unMountImage(3);
}
}
else
{
if(%obj.getMountedImage(0) $= 0)
{
%obj.mountImage(JetEngineImage2,0);
// %obj.mountImage(contrailImage2,3);
}
}
if(%obj.getMountedObject(0))
{
if(%obj.getMountedImage(1) $= 0)
{
%obj.mountImage(JetEngineImage1,1);
}
}
else
{
if(%obj.getMountedImage(1) !$= "")
{
%obj.unMountImage(1);
}
}
schedule(2000,0,"JetEngineCheck",%obj);
}