//-----------------------------------------------------------
//
//-----------------------------------------------------------
class SciFiPelican extends XS_Chopper;

#exec OBJ LOAD FILE=SciFiPelican_Beta.ukx
#exec AUDIO IMPORT FILE="classes\GAU8Cannon.WAV" NAME="GAU8Cannon" GROUP="pelicanweapon"
//#exec AUDIO IMPORT FILE="classes\bomb_x.WAV" NAME="bomb_x" GROUP="pelicanweapon"

var(Thrusters)  range           ThrusterPitchRange;
var(Thrusters)  range           REARThrusterPitchRange;
var(Thrusters)  float           ThrusterTurnSpeed;
var(Thrusters)  private int     RightThrusterPitch;
var(Thrusters)  private int     LeftThrusterPitch;
var(Thrusters)  private int     RightRearThrusterPitch;
var(Thrusters)  private int     LeftRearThrusterPitch;

var()   array<vector>					TrailEffectPositions;
var     class<ONSAttackCraftExhaust>	TrailEffectClass;
var     array<ONSAttackCraftExhaust>	TrailEffects;

var()	array<vector>					StreamerEffectOffset;
var     class<ONSAttackCraftStreamer>	StreamerEffectClass;
var		array<ONSAttackCraftStreamer>	StreamerEffect;

var ONSVehicle NewAttachVehicle; //magnum
var Vector VehicleAttachOffset;  //magnum
var()float VehicleAttachTraceDistance;   //magnum
var bool bAttached;  //magnum

//===========================================================================================
//================================== meowcat start ==========================================
//===========================================================================================

// Carry vehicles around the map
var ONSVehicle CargoVehicle;
var float NextGrabCheckTime;
var const float MAXLIFTMASS;

//===========================================================================================
//==================================Landing_Sequence_Code====================================
//===========================================================================================

var(Doors)      bool            bDoorsOpen;
var(Doors)      Sound           DoorsOpenSound;
var(Doors)      Sound           DoorsCloseSound;

/** Doors: Open the doors. */
simulated event PostBeginPlay()
{
    super.PostBeginPlay();

    OpenDoors();

}

/** Doors: Open doors if empty, otherwise close doors.
simulated event Tick(float DeltaTime)
{
    CheckDoors();

    super.Tick(DeltaTime);
}  */

/** Doors: Open doors if empty, otherwise close doors. */
event DrivingStatusChanged()
{
    super.DrivingStatusChanged();

    CheckDoors();
}

/** Doors: Open or close the doors as required. */
simulated function CheckDoors()
{
    if(!IsVehicleEmpty())
    {
        if(bDoorsOpen)
        {
            CloseDoors();
        }
    }
    else
    {
        if(!bDoorsOpen)
        {
            OpenDoors();
        }
    }
}

/** Doors: Open the doors. */
simulated function OpenDoors()
{
    PlayAnim('Gear_DOWN',, 0.5);
    //PlaySound(DoorsOpenSound, SLOT_None, 1,,,, false);
    bDoorsOpen = true;
}

/** Doors: Close the doors. */
simulated function CloseDoors()
{
    PlayAnim('Gear_UP',, 0.5);
    //PlaySound(DoorsCloseSound, SLOT_None, 1,,,, false);
    bDoorsOpen = false;
}

/** Cargo hold: Place driver in the cargo hold. */
function bool PlaceExitingDriver()
{
    local vector ExitPosition, ZOffset;

    ZOffset = Driver.default.CollisionHeight * vect(0,0,0.5);
    ExitPosition = Location + (ExitPositions[0] >> Rotation) + ZOffset;
    Driver.SetLocation(ExitPosition);

    return true;
}

//===========================================================================================
//==================================Landing_Sequence_Code_END================================
//===========================================================================================



simulated function SpecialCalcBehindView(PlayerController PC, out actor ViewActor, out vector CameraLocation, out rotator CameraRotation )
{
	local vector CamLookAt, HitLocation, HitNormal, OffsetVector;
	local Actor HitActor;
    local vector x, y, z;

	if (DesiredTPCamDistance < TPCamDistance)
		TPCamDistance = FMax(DesiredTPCamDistance, TPCamDistance - CameraSpeed * (Level.TimeSeconds - LastCameraCalcTime));
	else if (DesiredTPCamDistance > TPCamDistance)
		TPCamDistance = FMin(DesiredTPCamDistance, TPCamDistance + CameraSpeed * (Level.TimeSeconds - LastCameraCalcTime));

    GetAxes(PC.Rotation, x, y, z);
	ViewActor = self;
	CamLookAt = GetCameraLocationStart() + (TPCamLookat >> Rotation) + TPCamWorldOffset;

	OffsetVector = vect(0, 0, 0);
	OffsetVector.X = -1.0 * TPCamDistance;

	CameraLocation = CamLookAt + (OffsetVector >> PC.Rotation);

	HitActor = Trace(HitLocation, HitNormal, CameraLocation, Location, true, vect(40, 40, 40));
	if ( HitActor != None
	     && (HitActor.bWorldGeometry || HitActor == GetVehicleBase() || Trace(HitLocation, HitNormal, CameraLocation, Location, false, vect(40, 40, 40)) != None) )
			CameraLocation = HitLocation;

    CameraRotation = Normalize(PC.Rotation + PC.ShakeRot);
    CameraLocation = CameraLocation + PC.ShakeOffset.X * x + PC.ShakeOffset.Y * y + PC.ShakeOffset.Z * z;
}

// AI hint
function bool FastVehicle()
{
	return false;
}

replication
{
    // Variables the server should send to everybody
    reliable if( Role==ROLE_Authority)
	     CargoVehicle;
}


function AltFire(optional float F)
{
	if (!bWeaponIsFiring && level.timeseconds > NextGrabCheckTime)
    {
        if(CargoVehicle !=none) DropCargoVehicle();
        else CheckForCargoVehiclePickup();
        NextGrabCheckTime = level.timeseconds + 2.0;
    }
	else
		Super.AltFire(F);
}

function CheckForCargoVehiclePickup()
{
     local vector HitLoc, HitNorm, Start, End, X,Y,Z, vDelta;
     local actor HitActor;

     if(CargoVehicle!=none) return;
     Start = Location;
     End = Start - vect(0,0,300);     //End = Start - vect(0,0,300);
     HitActor = Trace(HitLoc, HitNorm, End, Start, true,);
     // only pick up empty vehicles that weight less than we do
     if ( HitActor != None && ONSVehicle(HitActor)!=none && ONSVehicle(HitActor).IsVehicleEmpty()
     && ONSVehicle(HitActor).KGetMass() < MAXLIFTMASS )
     {
        // now attach this vehicle and see if we can also keep its basic collision on!
        GetAxes(Rotation, X, Y, Z);
        CargoVehicle = ONSVehicle(HitActor);
        vDelta = HitLoc - CargoVehicle.location;

        CargoVehicle.SetPhysics(PHYS_None);
        CargoVehicle.SetRotation(Rotation);
        CargoVehicle.SetLocation(Location - X*FMax((250 + vDelta.Z), 150) ); // below the vehicle but include the offset  //CargoVehicle.SetLocation(Location - Z*FMax((50 + vDelta.Z), 150) ); // below the vehicle but include the offset
        CargoVehicle.bBlockZeroExtentTraces=false; // so that the dust checks will travel through the vehicle
        CargoVehicle.bHardAttach=true;
        CargoVehicle.SetBase(self);
        CargoVehicle.SetCollision(false, false, false);
        CargoVehicle.SetTeamNum(Team); // conver to the copter's team
        if(Controller!=None && PlayerController(Controller)!=none)
            PlayerController(Controller).ReceiveLocalizedMessage(class'DropShipMessages', 3);
     }
     else
     {
        if(Controller!=None && PlayerController(Controller)!=none)
            PlayerController(Controller).ReceiveLocalizedMessage(class'DropShipMessages', 8);
     }
}

function DropCargoVehicle()
{
    local vector NewMomentum;
    local KarmaParams KP;

    if(CargoVehicle == none) return;
    KP = KarmaParams(KParams);
    CargoVehicle.bBlockZeroExtentTraces = CargoVehicle.default.bBlockZeroExtentTraces;
    CargoVehicle.bhardAttach = CargoVehicle.default.bhardAttach;
    CargoVehicle.SetBase(none);
    CargoVehicle.SetCollision(true, true, true);
    //CargoVehicle.Velocity = Velocity; // drop this vehicle with the imparted speed from the copter
    CargoVehicle.SetPhysics(PHYS_Karma);
    CargoVehicle.Velocity = Velocity; // drop this vehicle with the imparted speed from the copter DOES NOT WORK!
    NewMomentum = Normal(Velocity) * 300000 * (VSize(Velocity)/ KP.kMaxSpeed);
    CargoVehicle.KAddImpulse(NewMomentum, vect(0,0,0));
    if(Controller!=None && PlayerController(Controller)!=none)
            PlayerController(Controller).ReceiveLocalizedMessage(class'DropShipMessages', 0);
    CargoVehicle = None;
}

function Died(Controller Killer, class<DamageType> damageType, vector HitLocation)
{
    local int i;

    if(Level.NetMode != NM_DedicatedServer)
	{
    	for(i=0;i<TrailEffects.Length;i++)
        	TrailEffects[i].Destroy();
        TrailEffects.Length = 0;

		for(i=0; i<StreamerEffect.Length; i++)
			StreamerEffect[i].Destroy();
		StreamerEffect.Length = 0;
    }
    DropCargoVehicle();
	Super.Died(Killer, damageType, HitLocation);
}

//===========================================================================================
//================================== meowcat end ============================================
//===========================================================================================


simulated function Destroyed()
{
    Super.Destroyed();
}


//====================================


simulated function Tick(float DeltaTime)
{
        CheckDoors();
        super.Tick(DeltaTime);
        // Does this even work?
    if(Level.Pauser == none)
    {
        RotateThrusters(DeltaTime);
        RotateREARThrusters(DeltaTime);
    }
}

/** Thrusters: Rotate the thrusters according to movement. */
simulated function RotateThrusters(float DeltaTime)
{
    local float LinearSpeedFactor;
    local float TurnSpeedFactor;
    local float RightThrusterSpeed;
    local float LeftThrusterSpeed;
    local int DesiredRightThrusterPitch;
    local int DesiredLeftThrusterPitch;

    // Thrust related pitch, common to both thrusters.
    LinearSpeedFactor = GetLinearSpeedFactor();
    // Steering related pitch, opposite for both thrusters.
    TurnSpeedFactor = GetTurnSpeedFactor();


    // Left thruster.

    LeftThrusterSpeed = FClamp(LinearSpeedFactor - TurnSpeedFactor, -1, 1);
    DesiredLeftThrusterPitch = GetDesiredThrusterPitch(LeftThrusterSpeed);

    if(LeftThrusterPitch != DesiredLeftThrusterPitch)
    {
        // Make it so.
        LeftThrusterPitch = DesiredLeftThrusterPitch;
        SetThrusterPitch('LFEngineBone', LeftThrusterPitch);
    }


    // Right thruster.

    RightThrusterSpeed = FClamp(LinearSpeedFactor + TurnSpeedFactor, -1, 1);
    DesiredRightThrusterPitch = GetDesiredThrusterPitch(RightThrusterSpeed);

    if(RightThrusterPitch != DesiredRightThrusterPitch)
    {
        // Make it so.
        RightThrusterPitch = DesiredRightThrusterPitch;
        SetThrusterPitch('RFEngineBone', RightThrusterPitch);
    }


}

/** REARThrusters: Rotate the thrusters according to movement.    */
simulated function RotateRearThrusters(float DeltaTime)
{
    local float LinearSpeedFactor;
    local float TurnSpeedFactor;
    local float RightREARThrusterSpeed;
    local float LeftREARThrusterSpeed;
    local int DesiredRightREARThrusterPitch;
    local int DesiredLeftREARThrusterPitch;

    // Thrust related pitch, common to both thrusters.
    LinearSpeedFactor = GetLinearSpeedFactor();
    // Steering related pitch, opposite for both thrusters.
    TurnSpeedFactor = GetTurnSpeedFactor();


    // LeftREAR thruster.

    LeftREARThrusterSpeed = FClamp(LinearSpeedFactor - TurnSpeedFactor, -1, 1);
    DesiredLeftREARThrusterPitch = GetDesiredThrusterPitch(LeftREARThrusterSpeed);

    if(LeftREARThrusterPitch != DesiredLeftREARThrusterPitch)
    {
        // Make it so.
        LeftREARThrusterPitch = DesiredLeftREARThrusterPitch;
        SetThrusterPitch('LREngineBone', LeftREARThrusterPitch);
    }


    // RightREAR thruster.

    RightREARThrusterSpeed = FClamp(LinearSpeedFactor + TurnSpeedFactor, -1, 1);
    DesiredRightREARThrusterPitch = GetDesiredThrusterPitch(RightREARThrusterSpeed);

    if(RightREARThrusterPitch != DesiredRightREARThrusterPitch)
    {
        // Make it so.
        RightREARThrusterPitch = DesiredRightREARThrusterPitch;
        SetThrusterPitch('RREngineBone', RightREARThrusterPitch);
    }


}

// Get the pitch that goes with the speed.
simulated function int GetDesiredThrusterPitch(float ThrusterSpeed)       //private function int GetDesiredThrusterPitch(float ThrusterSpeed)
{
    local int DesiredThrusterPitch;
    //local range HalfThrusterPitchRange;

    if(ThrusterSpeed <= 0)
    {
        // Use forward half of arc.
        DesiredThrusterPitch = ThrusterPitchRange.Max * -ThrusterSpeed;
    }
    else
    {
        // Use rear half of arc.
        // Compensate for MinThrottle.
        DesiredThrusterPitch = ThrusterPitchRange.Min * ThrusterSpeed;
        DesiredThrusterPitch = DesiredThrusterPitch / -MinThrottle;
    }

    DesiredThrusterPitch = Clamp(DesiredThrusterPitch, ThrusterPitchRange.Min, ThrusterPitchRange.Max);

    return DesiredThrusterPitch;
}

// REAR Get the pitch that goes with the speed.
simulated function int GetREARDesiredThrusterPitch(float REARThrusterSpeed)     //private function int GetREARDesiredThrusterPitch(float REARThrusterSpeed)
{
    local int REARDesiredThrusterPitch;
    //local range HalfThrusterPitchRange;

    if(REARThrusterSpeed <= 0)
    {
        // Use forward half of arc.
        REARDesiredThrusterPitch = REARThrusterPitchRange.Max * -REARThrusterSpeed;
    }
    else
    {
        // Use rear half of arc.
        // Compensate for MinThrottle.
        REARDesiredThrusterPitch = REARThrusterPitchRange.Min * REARThrusterSpeed;
        REARDesiredThrusterPitch = REARDesiredThrusterPitch / -MinThrottle;
    }

    REARDesiredThrusterPitch = Clamp(REARDesiredThrusterPitch,REARThrusterPitchRange.Min, REARThrusterPitchRange.Max);

    return REARDesiredThrusterPitch;
}

simulated function float GetLinearSpeedFactor()     //private function float GetLinearSpeedFactor()
{
    local float LinearSpeed;
    local float LinearSpeedFactor;

    LinearSpeed = GetRelativeVelocity().X;
    LinearSpeedFactor = FClamp(LinearSpeed / KarmaParams(KParams).KMaxSpeed, -1, 1);

    return LinearSpeedFactor;
}

simulated function float GetTurnSpeedFactor()     //private function float GetTurnSpeedFactor()
{
    local float TurnSpeed;
    local KRigidBodyState BodyState;

    KGetRigidBodyState(BodyState);
    TurnSpeed = BodyState.AngVel.Z * ThrusterTurnSpeed;

    return TurnSpeed;
}

simulated function SetThrusterPitch(name ThrusterBone, float ThrusterPitch)     //private function SetThrusterPitch(name ThrusterBone, float ThrusterPitch)
{
    local rotator r;

    r.Pitch = ThrusterPitch;
    SetBoneRotation(ThrusterBone, r);
}


defaultproperties
{
     ThrusterPitchRange=(Min=-1000.000000,Max=3000.000000)                 /**(Min=-1,Max=3000)  */                                             //
     REARThrusterPitchRange=(Min=-1000.000000,Max=3000.000000)             /**(Min=-1,Max=3000)    */                                         //
     ThrusterTurnSpeed=0.500000         //0.300000           //0.5 works nice

     //=============LeftFrontEngine
     Exhausts(0)=(offset=(X=0.000000,Y=0.000000,Z=10.000000),Dir=(Pitch=-13000,Yaw=-13000,Roll=-16384),Size=7.000000,MinThrust=0.500000,Bone="LFExhaustBone")    //down                      back      Y=inboard/outboard      +/-    ,Yaw=-10000
     Exhausts(1)=(offset=(X=0.000000,Y=0.000000,Z=-10.000000),Dir=(Pitch=-13000,Yaw=-13000,Roll=-16384),Size=7.000000,MinThrust=0.500000,Bone="LFExhaustBone")    //down                             Z=Up/Down               +/-       ,Yaw=-10000
     Exhausts(2)=(offset=(X=0.000000,Y=-15.000000,Z=0.000000),Dir=(Pitch=31500),Size=7.000000,MinThrust=0.500000,Bone="LFExhaustBone_Rear")   //back                                  X=Front/Back            -/+
     Exhausts(3)=(offset=(X=0.000000,Y=15.000000,Z=0.000000),Dir=(Pitch=31500),Size=7.000000,MinThrust=0.500000,Bone="LFExhaustBone_Rear")    //back

     //=============RightFrontEngine
     Exhausts(4)=(offset=(X=0.000000,Y=0.000000,Z=10.000000),Dir=(Pitch=-13000,Yaw=13000,Roll=-16384),Size=7.000000,MinThrust=0.500000,Bone="RFExhaustBone")      //down
     Exhausts(5)=(offset=(X=0.000000,Y=0.000000,Z=-10.000000),Dir=(Pitch=-13000,Yaw=13000,Roll=-16384),Size=7.000000,MinThrust=0.500000,Bone="RFExhaustBone")      //down
     Exhausts(6)=(offset=(X=0.000000,Y=-15.000000,Z=0.000000),Dir=(Pitch=31500),Size=7.000000,MinThrust=0.500000,Bone="RFExhaustBone_Rear")     //back
     Exhausts(7)=(offset=(X=0.000000,Y=15.000000,Z=0.000000),Dir=(Pitch=31500),Size=7.000000,MinThrust=0.500000,Bone="RFExhaustBone_Rear")      //back
     // meowcat edit - fixed the array indices of exhasut emitters 9-14 to eb 8-13
     //=============LeftRearEngine
     Exhausts(8)=(offset=(X=0.000000,Y=0.000000,Z=0.000000),Dir=(Pitch=-13000,Yaw=-13000,Roll=-16384),Size=7.000000,MinThrust=0.500000,Bone="LRExhaustBone")       //down           Y=inboard/outboard     +/-
     Exhausts(9)=(offset=(X=0.000000,Y=-15.000000,Z=0.000000),Dir=(Pitch=31500),Size=7.000000,MinThrust=0.500000,Bone="LRExhaustBone_Rear")      //back           x=Up/Down              -/+
     Exhausts(10)=(offset=(X=0.000000,Y=15.000000,Z=0.000000),Dir=(Pitch=31500),Size=7.000000,MinThrust=0.500000,Bone="LRExhaustBone_Rear")       //back           z=Front/Back           +/-

     //=============RightRearEngine
     Exhausts(11)=(offset=(X=0.000000,Y=0.000000,Z=0.000000),Dir=(Pitch=-13000,Yaw=13000,Roll=-16384),Size=7.000000,MinThrust=0.500000,Bone="RRExhaustBone")       //down           Y=inboard/outboard     +/-
     Exhausts(12)=(offset=(X=0.000000,Y=-15.000000,Z=0.000000),Dir=(Pitch=31500),Size=7.000000,MinThrust=0.500000,Bone="RRExhaustBone_Rear")      //back           x=Up/Down              -/+
     Exhausts(13)=(offset=(X=0.000000,Y=15.000000,Z=0.000000),Dir=(Pitch=31500),Size=7.000000,MinThrust=0.500000,Bone="RRExhaustBone_Rear")       //back           z=Front/Back           +/-
     //StreamerOffsets(0)=(X=-20.000000,Y=-86.000000,Z=-8.000000)
     //StreamerOffsets(1)=(X=-20.000000,Y=86.000000,Z=-8.000000)
     //StreamerOffsets(2)=(X=-210.000000,Y=-40.000000,Z=-16.000000)
     //StreamerOffsets(3)=(X=-210.000000,Y=40.000000,Z=-16.000000)
     //StreamerOffsets(4)=(X=-293.000000,Z=50.000000)
     //StreamerOffsets(5)=(X=-280.000000,Z=-45.000000)

     //===================
     //===== meowcat =====
     //===================
     MAXLIFTMASS=12.0

     //===========MAGNET
     VehicleAttachOffset=(X=-200.000000,Z=86.000000)          //(X=-586.000000,Z=86.000000)
     VehicleAttachTraceDistance=500.000000
     
     //===========Landing_Sequence_Driver_IN_OUT=====================
     //DrivePos=(Z=150.000000)
     //DriveAnim="Crouch"
     //EntryPosition=(X=-20.000000,Z=-64.000000)
     //EntryRadius=35.000000
     

     //==============================================================

     MaxPitchSpeed=10.000000
     MinThrottle=-0.500000PitchCorrection=0.000000
     UprightStiffness=1000.000000      //500
     UprightDamping=600.000000         //300
     MaxThrustForce=100.000000
     LongDamping=1.400000        //0.4
     MaxStrafeForce=100.000000
     LatDamping=1.200000         //0.2
     MaxRiseForce=150.000000
     UpDamping=0.300000
     TurnTorqueFactor=600.000000
     TurnTorqueMax=1000000.000000
     TurnDamping=50.000000
     MaxYawRate=1.00000         //1.5
     PitchTorqueMax=50.000000
     PitchDamping=20.000000       //20
     RollTorqueStrafeFactor=100.000000
     RollTorqueMax=50.000000
     RollDamping=30.000000
     StopThreshold=100.000000
     MaxRandForce=3.000000
     RandForceInterval=0.750000
     PushForce=1.000000
     DriverWeapons(0)=(WeaponClass=Class'SciFiPelican.SciFiPelicanGun',WeaponBone="Gun") // meowcat edit
     //DriverWeapons(1)=(WeaponClass=Class'SciFiPelican.ONSMASRocketPack_Right',WeaponBone="RFExhaustBone")
     //DriverWeapons(2)=(WeaponClass=Class'SciFiPelican.ONSMASRocketPack_Left',WeaponBone="LFExhaustBone")
     bHasAltFire=False
     IdleSound=Sound'ONSVehicleSounds-S.AttackCraft.AttackCraftIdle'
     StartUpSound=Sound'ONSVehicleSounds-S.AttackCraft.AttackCraftStartUp'
     ShutDownSound=Sound'ONSVehicleSounds-S.AttackCraft.AttackCraftShutDown'
     DestroyedVehicleMesh=StaticMesh'SciFi_SM.ONSPelican_Destroyed'
     DestructionEffectClass=Class'SciFiPelican.SciFiPelicanExplosionEffect'
     DisintegrationEffectClass=Class'SciFiPelican.SciFiPelicanDeath'
     DisintegrationHealth=-125.000000
     DestructionLinearMomentum=(Min=0000.000000,Max=0000.000000)
     DestructionAngularMomentum=(Min=0.000000,Max=0.000000)
     DamagedEffectScale=10.500000
     DamagedEffectOffset=(X=0.000000,Y=0.000000,Z=220.000000)
     VehicleMass=5.000000      //5
     bFollowLookDir=False
     //ExitPositions(0)=(X=-70.000000,Y=-80.000000)
     //ExitPositions(1)=(X=-70.000000,Y=80.000000)
     EntryRadius=500.000000
     FPCamPos=(X=650.0,Z=175.0) //(X=450.0,Z=96.0) (X=850.000000,Z=160.000000) // meowcat edit
     TPCamDistance=4000.000000
     TPCamLookat=(X=1000.000000)
     TPCamDistRange=(Min=1000.000000,Max=4000.000000)
     MomentumMult=1.00
     DriverDamageMult=0.0
     VehiclePositionString="in a Halo3 Pelican"
     VehicleNameString="Halo3 Pelican"
     HornSounds(0)=Sound'ONSVehicleSounds-S.Horns.Horn09'
     bCanBeBaseForPawns=true// meowcat edit so that pawns can climb into the back of the pelican
     GroundSpeed=1.000000
     HealthMax=400.000000
     Health=400
     Mesh=Mesh'SciFiPelican_Beta.SciFiPelican_BETA_001'
     CollisionRadius=150.000000     //150
     CollisionHeight=70.000000      //70
     Begin Object Class=KarmaParamsRBFull Name=KParams0
        KInertiaTensor(0)=1.000000
         KInertiaTensor(3)=3.000000
         KInertiaTensor(5)=3.500000
         KCOMOffset=(X=-0.250000)
         KLinearDamping=0.000000
         KAngularDamping=0.000000
         KStartEnabled=True
         bKNonSphericalInertia=True
         KActorGravScale=0.000000
         bHighDetailOnly=False
         bClientOnly=False
         bKDoubleTickRate=True
         bKStayUpright=True
         bKAllowRotate=True
         bDestroyOnWorldPenetrate=True
         bDoSafetime=True
         KFriction=0.500000
         KImpactThreshold=300.000000
   /**
         KInertiaTensor(0)=1.000000
         KInertiaTensor(3)=3.000000
         KInertiaTensor(5)=3.500000
         KLinearDamping=0.000000
         KAngularDamping=0.000000
         KStartEnabled=True
         bKNonSphericalInertia=True
         KActorGravScale=0.000000
         KMaxSpeed=3000.000000
         bHighDetailOnly=False
         bClientOnly=False
         bKDoubleTickRate=True
         bKStayUpright=True
         bKAllowRotate=True
         bDestroyOnWorldPenetrate=True
         bDoSafetime=True
         KFriction=0.500000
         KImpactThreshold=300.000000     */
     End Object
     KParams=KarmaParamsRBFull'SciFiPelican.SciFiPelican.KParams0'

}
