//=============================================================================
// JetpackActor.
//=============================================================================
class JetpackActor extends Decoration;

var float TournamentFemale_Back, TFemale1_Back, TFemale2_Back, 
		  TournamentMale_Back, TMale1_Back, TMale2_Back, TBoss_Back;

function PostBeginPlay()
{
 Color();
}


function FlameOn()
{
	// log("=== FLAME ON ===");
	
	MultiSkins[4] = Texture'JetpackMeshFlameRed';
	Color();
}

function FlameOff()
{
	// log("--- FLAME OFF ---");
	MultiSkins[4] = Texture'FlakAmmoLED';
	//SaveConfig();
}

function Color()
{
 if ( Pawn(owner).PlayerReplicationInfo == None )
 {
  return;
 }
 
 
 
 Switch(Pawn(owner).PlayerReplicationInfo.Team)
 {
  Case 0:
  MultiSkins[3] = Texture'JetMetalRed';
  break;
  
  Case 1:
  MultiSkins[3] = Texture'JetMetalBlue';
  break;
  
  Case 2:
  MultiSkins[3] = Texture'JetMetalGreen';
  break;
  
  Case 3:
  MultiSkins[3] = Texture'JetMetalYellow';
  break;
 }
}

simulated function Tick(float DeltaTime)
{
 local vector X,Y,Z;
 if( Owner == None )
 {
  destroy();
  return;
 }
 GetAxes(Owner.Rotation, X,Y,Z);
 SetRotation(rotator(-1 * X));
 SetLocation(Owner.Location - 1.15 * Owner.CollisionRadius * X + Owner.CollisionHeight * vect(0,0,0.2.5));
 
 if(Role != ROLE_Authority){return;}
 if( Owner.GetStateName() == 'FeigningDeath' || Pawn(Owner).FindInventoryType(class'UT_Invisibility') != None )
 {
  bHidden=True;
 }
 else
 {
  bHidden=False;
 }
}

defaultproperties
{
    bStatic=False
    bOwnerNoSee=True
    Physics=PHYS_None
    RemoteRole=ROLE_SimulatedProxy
    DrawType=DT_Mesh
    DrawScale=0.75
    Mesh=Mesh'JetpackFirefly'
    bCollideWhenPlacing=True
    MultiSkins(0)=Texture'JetMetal'
    MultiSkins(1)=Texture'JetTanksLabled'
    MultiSkins(2)=Texture'JetTanks'
    MultiSkins(3)=Texture'JetMetalBlue'
    MultiSkins(4)=Texture'FlakAmmoLED'
    CollisionRadius=0.00
    CollisionHeight=0.00
    bCollideActors=False
    bCollideWorld=False
    bBlockActors=False
}
