//=====================================================================
// NemesisWINGSvX.
//
//      ""(§)FrÅgÊd(§)""
//               **Monarch**
//
//              555 ---===CrAzYBoNeS===--- 555
//			Boppolis_The_Dog
//
//
// Thank you Al McElrath for SLV2.
//=====================================================================
/** Used in standalone games (or listen servers where the rider has
	the viewport) to get a tick() *after* the rocket position has been
	updated. If we don't use this, the rider and rocket become desynced
	slightly and it looks bad.
*/
class Controller extends SLInfo;


var Util u;


function postBeginPlay() {
	u = spawn(Class'Util', self);
	u.setDebugLevel(DL_Normal);
}

function tick(float d) {

    local StrangeShell sl;
    local Pawn pilot;
    local Inventory IPSM;

    sl = StrangeShell(owner);

    if (sl == none &&  Pawn(Owner) != None) {
        Pawn(Owner).bHidden=False;
          Pawn(Owner).Visibility = Pawn(Owner).Default.Visibility;
          Pawn(Owner).SetDefaultDisplayProperties();
     	destroy();
    } else if(sl != None && sl.bDestroyed)
	{
	Pawn(Owner).bHidden=False;
          Pawn(Owner).Visibility = Pawn(Owner).Default.Visibility;
          Pawn(Owner).SetDefaultDisplayProperties();
     destroy();
	}
	else if (sl != None)
	{
        	sl.ctick(d);
    }
}
function destroyed() {
	u.debug("destroyed()");
	super.destroyed();
}

defaultproperties
{
     bNetTemporary=True
     RemoteRole=ROLE_None
}
