//--------------------------------------
// SuperChaingun
//--------------------------------------
datablock ParticleData(ChronoDebrisParticle)
{
   dragCoefficient      = 1.5;
   gravityCoefficient   = 0;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 4000;
   lifetimeVarianceMS   = 0;
   textureName          = "special/blueSpark";
   colors[0]     = "0.9 0.9 0.9 0.5";
   colors[1]     = "0.0 0.0 0.9 0";
   colors[2]     = "0.5 0.5 0.5 0";
   sizes[0]      = 0.6;
   sizes[1]      = 1;
   sizes[2]      = 1.5;
};

datablock ParticleEmitterData(ChronoDebrisSmoker)
{
   ejectionPeriodMS = 5;
   periodVarianceMS = 0;
   ejectionVelocity = 1;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 10;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvances = false;
   orientParticles = true;
   particles = "ChronoDebrisParticle";
};


datablock ParticleData(IonParticle)
{
   dragCoeffiecient     = 0.0;
   gravityCoefficient   = -0.0;   // rises slowly
   inheritedVelFactor   = 0.0;
   windCoefficient   = 0.0; 

   lifetimeMS           =  2200;
   lifetimeVarianceMS   =  0;
   useInvAlpha          =  false;
   spinRandomMin        = 0.0;
   spinRandomMax        =  0.0;

   animateTexture = false;

   textureName = "Special/lensFlare/flare00";

   colors[0]     = "0.6 0.6 0.6 0.5";
   colors[1]     = "0.5 0.5 0.5 0.5";
   colors[2]     = "0.4 0.4 0.4 0.5";
   sizes[0]      = 0.1;
   sizes[1]      = 1;
   sizes[2]      = 1.4;
   times[0]      = 0.0;
   times[1]      = 0.5;
   times[2]      = 1.0;

};


datablock ParticleEmitterData(IonSmokeEmitter)
{
   ejectionPeriodMS = 35;
   periodVarianceMS = 0;

   ejectionVelocity = 0;
   velocityVariance = 0;

   thetaMin         = 0.0;
   thetaMax         = 0.0;

   particles = "IonParticle";
};
datablock SeekerProjectileData(MatrixWeapon)
{
   casingShapeName     = "weapon_missile_casement.dts";
   projectileShapeName = "weapon_missile_projectile.dts";
   scale = "0.5 0.5 0.5";
   hasDamageRadius     = false;
   indirectDamage      = 0;
   damageRadius        = 0.0;
   radiusDamageType    = $DamageType::Default;
   kickBackStrength    = 200;
   explosion           = "ChaingunExplosion";
   splash              = MissileSplash;
   velInheritFactor    = 0.7;    // to compensate for slow starting velocity, this value
                                 // is cranked up to full so the missile doesn't start
                                 // out behind the player when the player is moving
                                 // very quickly - bramage
   baseEmitter         = IonSmokeEmitter;
   delayEmitter        = "";
   puffEmitter         = "";
   bubbleEmitter       = "";
   bubbleEmitTime      = 1.0;

   exhaustEmitter      = "";
   exhaustTimeMs       = 300;
   exhaustNodeName     = "muzzlePoint1";
  lifetimeMS          = 25000;
   muzzleVelocity      = 7.0;
   maxVelocity         = 8.0;
   turningSpeed        = 240.0;
   acceleration        = 300.0;

   proximityRadius     = 3;

   terrainAvoidanceSpeed         = 180;
   terrainScanAhead              = 25;
   terrainHeightFail             = 12;
   terrainAvoidanceRadius        = 100;

   flareDistance = 200;
   flareAngle    = 30;
   sound = "";
   hasLight    = true;
   lightRadius = 1.0;
   lightColor  = "0.2 0.05 0";
   useFlechette = false;
//   flechetteDelayMs = 550;
//   casingDeb = FlechetteDebris;
   explodeOnWaterImpact = false;
};
datablock LinearFlareProjectileData(IonPulse)
{
   projectileShape = "grenade_projectile.dts";
   directDamage        = 0.0;
   hasDamageRadius     = true;
   indirectDamage      = 0.001;
   damageRadius        = 10.0;
   kickBackStrength    = 10000.0;
   radiusDamageType    = $DamageType::Plasma;

   explosion           = "UnderwaterMortarExplosion";
   splash              = PlasmaSplash;

   baseEmitter         = IonSmokeEmitter;

   dryVelocity       = 10.0;
   wetVelocity       = 10;
   velInheritFactor  = 0.3;
   fizzleTimeMS      = 20000;
   lifetimeMS        = 30000;
   explodeOnDeath    = false;
   reflectOnWaterImpactAngle = 0.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = -1;

   //activateDelayMS = 100;
   activateDelayMS = -1;

   size = 0.001;
   size[0]           = 0.00002;
   size[1]           = 0.0;
   size[2]           = 0.0000;


   numFlares         = 0;
   flareColor        = "0 0 0";
   flareModTexture   = "flaremod";
   flareBaseTexture  = "special/flare3";

	sound        = PlasmaProjectileSound;
   fireSound    = IonFireSound;
   wetFireSound = PlasmaFireWetSound;

   hasLight    = true;
   lightRadius = 3.0;
   lightColor  = "0 0 0";
};

datablock ExplosionData(FlamerExplosion)
{
   soundProfile   = PlasmaReloadSound;
};
datablock ExplosionData(ExpBulletsExplosion)
{
   explosionShape = "effect_plasma_explosion.dts";
   playSpeed = 1.5;
   soundProfile   = MissileExplosionSound;
   faceViewer = true;

   sizes[0] = "0.5 0.5 0.5";
   sizes[1] = "0.5 0.5 0.5";
   sizes[2] = "0.5 0.5 0.5";

   emitter[0] = MissileExplosionSmokeEmitter;

   debris = MissileSpikeDebris;
   debrisThetaMin = 10;
   debrisThetaMax = 170;
   debrisNum = 8;
   debrisNumVariance = 6;
   debrisVelocity = 15.0;
   debrisVelocityVariance = 2.0;

   shakeCamera = true;
   camShakeFreq = "6.0 7.0 7.0";
   camShakeAmp = "70.0 70.0 70.0";
   camShakeDuration = 1.0;
   camShakeRadius = 7.0;
};

//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock TracerProjectileData(ExpBullets)
{
   doDynamicClientHits = true;

   directDamage        =0.0825 * 8;
   directDamageType    = $DamageType::SuperChaingun;
   explosion           = ExpBulletsExplosion;
   splash              = ChaingunSplash;

   hasDamageRadius     = true;
   indirectDamage      = 0.45 * 2;
   damageRadius        = 4.0 * 4;
   radiusDamageType    = $DamageType::SuperChaingun;

   kickBackStrength  = 1750;
   sound             = ChaingunProjectile;

   dryVelocity       = 425.0;
   wetVelocity       = 100.0;
   velInheritFactor  = 1.0;
   fizzleTimeMS      = 3000;
   lifetimeMS        = 3000;
   explodeOnDeath    = false;
   reflectOnWaterImpactAngle = 0.0;
   explodeOnWaterImpact      = false;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = 3000;

   tracerLength    = 15.0;
   tracerAlpha     = false;
   tracerMinPixels = 6;
   tracerColor     = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
	tracerTex[0]  	 = "special/tracer00";
	tracerTex[1]  	 = "special/tracercross";
	tracerWidth     = 0.10;
   crossSize       = 0.20;
   crossViewAng    = 0.990;
   renderCross     = true;

   decalData[0] = ChaingunDecal1;
   decalData[1] = ChaingunDecal2;
   decalData[2] = ChaingunDecal3;
   decalData[3] = ChaingunDecal4;
   decalData[4] = ChaingunDecal5;
   decalData[5] = ChaingunDecal6;

   hasLight    = true;
   lightRadius = 5.0;
   lightColor  = "0.5 0.5 0.175";
};
datablock TracerProjectileData(SuperChaingunBullet)
{
   doDynamicClientHits = true;

   directDamage        =0.0825 * 8;
   directDamageType    = $DamageType::SuperChaingun;
   explosion           = ChaingunExplosion;
   splash              = ChaingunSplash;

   hasDamageRadius     = true;
   indirectDamage      = 0.45 * 2;
   damageRadius        = 4.0 * 2;
   radiusDamageType    = $DamageType::SuperChaingun;

   kickBackStrength  = 1750;
   sound             = ChaingunProjectile;

   dryVelocity       = 425.0;
   wetVelocity       = 100.0;
   velInheritFactor  = 1.0;
   fizzleTimeMS      = 3000;
   lifetimeMS        = 3000;
   explodeOnDeath    = false;
   reflectOnWaterImpactAngle = 0.0;
   explodeOnWaterImpact      = false;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = 3000;

   tracerLength    = 15.0;
   tracerAlpha     = false;
   tracerMinPixels = 6;
   tracerColor     = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
	tracerTex[0]  	 = "special/tracer00";
	tracerTex[1]  	 = "special/tracercross";
	tracerWidth     = 0.10;
   crossSize       = 0.20;
   crossViewAng    = 0.990;
   renderCross     = true;

   decalData[0] = ChaingunDecal1;
   decalData[1] = ChaingunDecal2;
   decalData[2] = ChaingunDecal3;
   decalData[3] = ChaingunDecal4;
   decalData[4] = ChaingunDecal5;
   decalData[5] = ChaingunDecal6;

   hasLight    = true;
   lightRadius = 5.0;
   lightColor  = "0.5 0.5 0.175";
};
datablock ParticleData(AniFlameParticle)
{
   dragCoeffiecient     = 0.7;
   gravityCoefficient   = 0.1;   // rises slowly
   inheritedVelFactor   = 0.05;

   lifetimeMS           =  3800;
   lifetimeVarianceMS   =  200;
   useInvAlpha          =  false;
   spinRandomMin        = -100.0;
   spinRandomMax        =  100.0;

   animateTexture = false;

   textureName = "special/Smoke/bigSmoke";

   animateTexture = true;
   framesPerSec = 25;

   animTexName[00]       = "special/Explosion/exp_0002";
   animTexName[01]       = "special/Explosion/exp_0004";
   animTexName[02]       = "special/Explosion/exp_0006";
   animTexName[03]       = "special/Explosion/exp_0008";
   animTexName[04]       = "special/Explosion/exp_0010";
   animTexName[05]       = "special/Explosion/exp_0012";
   animTexName[06]       = "special/Explosion/exp_0014";
   animTexName[07]       = "special/Explosion/exp_0016";
   animTexName[08]       = "special/Explosion/exp_0018";
   animTexName[09]       = "special/Explosion/exp_0020";
   animTexName[10]       = "special/Explosion/exp_0022";
   animTexName[11]       = "special/Explosion/exp_0024";
   animTexName[12]       = "special/Explosion/exp_0026";
   animTexName[13]       = "special/Explosion/exp_0028";
   animTexName[14]       = "special/Explosion/exp_0030";
   animTexName[15]       = "special/Explosion/exp_0032";
   animTexName[16]       = "special/Explosion/exp_0034";
   animTexName[17]       = "special/Explosion/exp_0036";
   animTexName[18]       = "special/Explosion/exp_0038";
   animTexName[19]       = "special/Explosion/exp_0040";
   animTexName[20]       = "special/Explosion/exp_0042";
   animTexName[21]       = "special/Explosion/exp_0044";
   animTexName[22]       = "special/Explosion/exp_0046";
   animTexName[23]       = "special/Explosion/exp_0048";
   animTexName[24]       = "special/Explosion/exp_0050";
   animTexName[25]       = "special/Explosion/exp_0052";

   colors[0]     = "1.0 0.2 0.0 0.4";
   colors[1]     = "1.0 0.2 0.0 0.6";
   colors[2]     = "1.0 0.2 0.0 0.2";
   sizes[0]      = 5.5;
   sizes[1]      = 6.0;
   sizes[2]      = 7.5;
   times[0]      = 0.0;
   times[1]      = 0.5;
   times[2]      = 1.0;

};
datablock ParticleEmitterData(AniFlameSmokeEmitter)
{
   ejectionPeriodMS = 9;
   periodVarianceMS = 0;

   ejectionVelocity = 0.1;
   velocityVariance = 0;

   thetaMin         = 0.0;
   thetaMax         = 50.0;

   particles = "AniFlameParticle";
};
datablock LinearFlareProjectileData(Flame)
{
   directDamage        = 0.2;
   emitterDelay        = -1;
   hasDamageRadius     = true;
   damageRadius        = 1.0;
   indirectDamage      = 0.1;
   kickBackStrength    = 0.0;
   radiusDamageType    = $DamageType::Fire;

   explosion           = "FlamerExplosion";
   splash              = PlasmaSplash;

   baseEmitter   = AniFlameSmokeEmitter;

   dryVelocity       = 45.0;
   wetVelocity       = -1;
   velInheritFactor  = 0.3;
   fizzleTimeMS      = 200;
   lifetimeMS        = 500;
   explodeOnDeath    = false;
   reflectOnWaterImpactAngle = 0.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = -1;

   //activateDelayMS = 100;
   activateDelayMS = -1;

  scale             = "0.5 0.5 0.5";
   numFlares         = 3;
   flareColor        = "1.0 0.5 0.0";
   flareModTexture   = "flaremod";
   flareBaseTexture  = "flarebase";

	sound        = PlasmaProjectileSound;
   fireSound    = InfernoFireSound;
   wetFireSound = PlasmaFireWetSound;

   hasLight    = true;
   lightRadius = 3.0;
   lightColor  = "1 0.75 0.25";
};
function Flame::onExplode(%data, %proj, %pos)
{
     Parent::onExplode(%data, %proj, %pos);
     %this.owner = %plyr.client;
     %this = new ParticleEmissionDummy(ParticleEmissionDummy)
          {
             position = %pos;
		rotation = "0 0 0 1";
		scale = "1 1 1";
		dataBlock = "halftimeEmissionDummy";
		emitter = "QuantiumFireEmitter";
		velocity = "1";
        };
     schedule(getRandom(12000,13000), 0, "killit", %this);//<< made an error here
     %this.setTransform(%proj.getTransform());
}
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------

datablock ItemData(SuperChaingunAmmo)
{
   className = Ammo;
   catagory = "Ammo";
   shapeFile = "ammo_chaingun.dts";
   mass = 1;
   elasticity = 0.2;
   friction = 0.6;
   pickupRadius = 2;
   pickUpName = "some super chaingun ammo";

   computeCRC = true;

};

//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(SuperChaingunImage)
{
   className = WeaponImage;
   shapeFile = "weapon_chaingun.dts";
   item      = SuperChaingun;
   ammo 	 = SuperChaingunAmmo;

   projectile = SuperChaingunBullet;
   projectileType = TracerProjectile;

   emap = true;

   casing              = ShellDebris;
   shellExitDir        = "0.3 0.5 1.0";
   shellExitOffset     = "0.15 -0.56 -0.1";
   shellExitVariance   = 20.0;
   shellVelocity       = 4.0;

//   realName = SuperChaingun;
///   nextMode = ChaingunGaussImage;
//   displayName = "Chaingun";
//   displayMode = "Standard";
   
   //--------------------------------------
   stateName[0]             = "Activate";
   stateSequence[0]         = "Activate";
   stateSound[0]            = ChaingunSwitchSound;
   stateAllowImageChange[0] = false;
   //
   stateTimeoutValue[0]        = 0.5;
   stateTransitionOnTimeout[0] = "Ready";
   stateTransitionOnNoAmmo[0]  = "NoAmmo";

   //--------------------------------------
   stateName[1]       = "Ready";
   stateSpinThread[1] = Stop;
   //
   stateTransitionOnTriggerDown[1] = "Spinup";
   stateTransitionOnNoAmmo[1]      = "NoAmmo";

   //--------------------------------------
   stateName[2]               = "NoAmmo";
   stateTransitionOnAmmo[2]   = "Ready";
   stateSpinThread[2]         = Stop;
   stateTransitionOnTriggerDown[2] = "DryFire";

   //--------------------------------------
   stateName[3]         = "Spinup";
   stateSpinThread[3]   = SpinUp;
   stateSound[3]        = ChaingunSpinupSound;
   //
   stateTimeoutValue[3]          = 0.3;
   stateWaitForTimeout[3]        = false;
   stateTransitionOnTimeout[3]   = "Fire";
   stateTransitionOnTriggerUp[3] = "Spindown";

   //--------------------------------------
   stateName[4]             = "Fire";
   stateSequence[4]            = "Fire";
   stateSequenceRandomFlash[4] = true;
   stateSpinThread[4]       = FullSpeed;
   stateSound[4]            = ChaingunFireSound;
   //stateRecoil[4]           = LightRecoil;
   stateAllowImageChange[4] = false;
   stateScript[4]           = "onFire";
   stateFire[4]             = true;
   stateEjectShell[4]       = true;
   //
   stateEmitter[4]     = "ChaingunImpactSmoke";
   stateEmitterTime[4] = 0.9;
   stateEmitterNode[4] = "muzzlepoint1";
   
   stateTimeoutValue[4]          = 0.03;
   stateTransitionOnTimeout[4]   = "Fire";
   stateTransitionOnTriggerUp[4] = "Spindown";
   stateTransitionOnNoAmmo[4]    = "EmptySpindown";

   //--------------------------------------
   stateName[5]       = "Spindown";
   stateSound[5]      = ChaingunSpinDownSound;
   stateSpinThread[5] = SpinDown;
   //
   stateTimeoutValue[5]            = 1.0;
   stateWaitForTimeout[5]          = true;
   stateTransitionOnTimeout[5]     = "Ready";
   stateTransitionOnTriggerDown[5] = "Spinup";

   //--------------------------------------
   stateName[6]       = "EmptySpindown";
   stateSound[6]      = ChaingunSpinDownSound;
   stateSpinThread[6] = SpinDown;
   //
   stateTimeoutValue[6]        = 0.5;
   stateTransitionOnTimeout[6] = "NoAmmo";
   
   //--------------------------------------
   stateName[7]       = "DryFire";
   stateSound[7]      = ChaingunDryFireSound;
   stateTimeoutValue[7]        = 0.5;
   stateTransitionOnTimeout[7] = "NoAmmo";
};

datablock ItemData(SuperChaingun)
{
   className    = Weapon;
   catagory     = "Spawn Items";
   shapeFile    = "weapon_chaingun.dts";
   image        = SuperChaingunImage;
   mass         = 1;
   elasticity   = 0.2;
   friction     = 0.6;
   pickupRadius = 2;
   pickUpName   = "a super chaingun";

   computeCRC = true;
   emap = true;
};

function SuperChaingunImage::onFire(%data,%obj,%slot) {
	if (%obj.superChaingunMode == 1) {
		%pos = %obj.getMuzzlePoint(%slot);
		%vec = %obj.getMuzzleVector(%slot);
		%res = containerRayCast(%pos,vectorAdd(%pos,vectorScale(%vec,2000)), $TypeMasks::PlayerObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::StaticObjectType,%obj);
		if (%res)
			%hitLoc = getWords(%res,1,3);
		else
			%hitLoc = vectorAdd(%pos,vectorScale(%vec,2000));
        createProj(ShockBeam,SniperProjectile,%obj.getMuzzlePoint(0),%obj.getMuzzleVector(0));
		//zap(0,25,%hitLoc);
		%obj.decInventory(%data.ammo,1);
	}
	else if (%obj.superChaingunMode > 1)
                {
                if (!(%obj.lasteffectpulse+2000 < getSimTime()))
                   return;
                %obj.lasteffectpulse = GetSimTime();
                %pos = %obj.getMuzzlePoint(%slot);
		%vec = %obj.getMuzzleVector(%slot);
                %res = containerRayCast(%pos,vectorAdd(%pos,vectorScale(%vec,2000)), $TypeMasks::PlayerObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::StaticObjectType| $TypeMasks::ForceFieldObjectType ,%obj);
		if (%res)
                    Aidpulse(getWords(%res,1,3),%obj.client,%obj.superChaingunMode-2);

                }
       else
		Parent::onFire(%data, %obj, %slot);
}

function SuperChaingunImage::onMount(%this,%obj,%slot) {
	%obj.usingSuperChaingun = true;
	if (!%obj.superChaingunMode)
		%obj.superChaingunMode = 0;
	if (!%obj.superChaingunMode2)
		%obj.superChaingunMode2 = 0;
	displaySCGStatus(%obj);
	WeaponImage::onMount(%this,%obj,%slot);
}

function SuperChaingunImage::onUnmount(%data, %obj, %slot) {
    %obj.usingSuperChaingun = false;
	WeaponImage::onUnmount(%data, %obj, %slot);
}

function displaySCGStatus(%obj) {
	if (%obj.superChaingunMode == 1)
		bottomPrint(%obj.client,"SCG Ion : Progression " @ ($Ion::StopIon ? "disabled" : "enabled"),2,1);
	else if (%obj.superChaingunMode == 2)
		bottomPrint(%obj.client,"SCG Repair Pulse",2,1);
	else if (%obj.superChaingunMode == 3)
		bottomPrint(%obj.client,"SCG Cloak Pulse",2,1);
	else if (%obj.superChaingunMode == 4)
		bottomPrint(%obj.client,"SCG Disasemble Pulse",2,1);
    else if (%obj.superChaingunMode == 5)
		bottomPrint(%obj.client,"SCG Electro Static Pulse",2,1);
    else if (%obj.superChaingunMode == 6)
		bottomPrint(%obj.client,"SCG Morphing Pulse",2,1);
    else if (%obj.superChaingunMode == 7)
		bottomPrint(%obj.client,"SCG Kill Pulse",2,1);
	else
		bottomPrint(%obj.client,"SCG Normal",2,1);
}
//function ChaingunGaussImage::onMount(%this, %obj, %slot)
//{
//Parent::onMount(%this, %obj, %slot);
//commandToClient( %obj.client, 'BottomPrint', "<spush><font:Arial:18><color:ff3300>Super Chaingun : <color:ffaa00>>Mode : <color:ffcc00>Special Explosive Bullets<spop>", 3, 1);
//}
//function SChaingunImage::onMount(%this, %obj, %slot)
//{
//Parent::onMount(%this, %obj, %slot);
//commandToClient( %obj.client, 'BottomPrint', "<spush><font:Arial:18><color:ff3300>Super Chaingun : <color:ffaa00>>Mode : <color:ffcc00>Ion Pulse<spop>", 3, 1);
//}
//function BomberChaingunImage::onMount(%this, %obj, %slot)
//{
//Parent::onMount(%this, %obj, %slot);
//commandToClient( %obj.client, 'BottomPrint', "<spush><font:Arial:18><color:ff3300>Super Chaingun : <color:ffaa00>>Mode : <color:ffcc00>Bomber Bombs<spop>", 3, 1);
//}
//function BellyTurretChaingunImage::onMount(%this, %obj, %slot)
//{
//Parent::onMount(%this, %obj, %slot);
//commandToClient( %obj.client, 'BottomPrint', "<spush><font:Arial:18><color:ff3300>Super Chaingun : <color:ffaa00>>Mode : <color:ffcc00>Belly Bomber Bolts<spop>", 3, 1);
//}
//function FlamerChaingunImage::onMount(%this, %obj, %slot)
//{
//Parent::onMount(%this, %obj, %slot);
//commandToClient( %obj.client, 'BottomPrint', "<spush><font:Arial:18><color:ff3300>Super Chaingun : <color:ffaa00>>Mode : <color:ffcc00>Flame Thrower SCG<spop>", 3, 1);
//}
//function FlakChaingunImage::onMount(%this, %obj, %slot)
//{
//Parent::onMount(%this, %obj, %slot);
//commandToClient( %obj.client, 'BottomPrint', "<spush><font:Arial:18><color:ff3300>Super Chaingun : <color:ffaa00>>Mode : <color:ffcc00>SSM<spop>", 3, 1);
//}
//function NerfGunChaingunImage::onMount(%this, %obj, %slot)
//{
//Parent::onMount(%this, %obj, %slot);
//commandToClient( %obj.client, 'BottomPrint', "<spush><font:Arial:18><color:ff3300>Super Chaingun : <color:ffaa00>>Mode : <color:ffcc00>Nerf Bolts<spop>", 3, 1);
//}
//function NerfBallChaingunImage::onMount(%this, %obj, %slot)
//{
//Parent::onMount(%this, %obj, %slot);
//commandToClient( %obj.client, 'BottomPrint', "<spush><font:Arial:18><color:ff3300>Super Chaingun : <color:ffaa00>>Mode : <color:ffcc00>Nerf Balls<spop>", 3, 1);
//}
//function MortarChaingunImage::onMount(%this, %obj, %slot)
//{
//Parent::onMount(%this, %obj, %slot);
//commandToClient( %obj.client, 'BottomPrint', "<spush><font:Arial:18><color:ff3300>Super Chaingun : <color:ffaa00>>Mode : <color:ffcc00>Mortars<spop>", 3, 1);
//}
//function MeteorChaingunImage::onMount(%this, %obj, %slot)
//{
//Parent::onMount(%this, %obj, %slot);
//commandToClient( %obj.client, 'BottomPrint', "<spush><font:Arial:18><color:ff3300>Super Chaingun : <color:ffaa00>>Mode : <color:ffcc00>Giant Meteors<spop>", 3, 1);
//}
//datablock ShapeBaseImageData(SChaingunImage) : SuperChaingunImage // -- inherits blaster properties except
//{                                                               // for the ones that are redefined (ST)
//   item = SChaingun;
//
// <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Added properties to track images (ST)
//   realName = SuperChaingun;
//   nextMode = BomberChaingunImage;
//   displayName = "Chaingun";
//   displayMode = "Shrike";
// --- End added properties (ST)
//
//};
//datablock ShapeBaseImageData(FlakChaingunImage) : SuperChaingunImage // -- inherits blaster properties except
//{                                                               // for the ones that are redefined (ST)
//   item = FlakChaingun;
//
// <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Added properties to track images (ST)
//   realName = SuperChaingun;
//   nextMode = MortarChaingunImage;
//   displayName = "Chaingun";
//   displayMode = "Shrike";
// --- End added properties (ST)
//
//};
//datablock ShapeBaseImageData(FlamerChaingunImage) : SuperChaingunImage // -- inherits blaster properties except
//{                                                               // for the ones that are redefined (ST)
//   item = FlamerChaingun;
//
// <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Added properties to track images (ST)
//   realName = SuperChaingun;
//   nextMode = FlakChaingunImage;
//   displayName = "Chaingun";
//   displayMode = "Shrike";
// --- End added properties (ST)
//
//};
//datablock ShapeBaseImageData(BellyTurretChaingunImage) : SuperChaingunImage // -- inherits blaster properties except
//{                                                               // for the ones that are redefined (ST)
//   item = BellyTurretChaingun;
//
// <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Added properties to track images (ST)
//   realName = SuperChaingun;
//   nextMode = FlamerChaingunImage;
//   displayName = "Chaingun";
//   displayMode = "Shrike";
// --- End added properties (ST)
//
//};
//datablock ShapeBaseImageData(BomberChaingunImage) : SuperChaingunImage // -- inherits blaster properties except
//{                                                               // for the ones that are redefined (ST)
//   item = BomberChaingun;
//
// <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Added properties to track images (ST)
//   realName = SuperChaingun;
//   nextMode = BellyTurretChaingunImage;
//   displayName = "Chaingun";
//   displayMode = "Shrike";
// --- End added properties (ST)
//
//};
// datablock ShapeBaseImageData(ChaingunGaussImage) : SuperChaingunImage // -- inherits blaster properties except
//{                                                               // for the ones that are redefined (ST)
//   item = ChaingunGauss;
//
// <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Added properties to track images (ST)
//   realName = SuperChaingun;
//   nextMode = SChaingunImage;
//   displayName = "Chaingun";
//   displayMode = "Gauss";
// --- End added properties (ST)
//
//};
///------------------------
//datablock ShapeBaseImageData(MortarChaingunImage) : SuperChaingunImage // -- inherits blaster properties except
//{                                                               // for the ones that are redefined (ST)
//   item = MortarChaingun;
//
// <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Added properties to track images (ST)
//   realName = SuperChaingun;
//   nextMode = NerfGunChaingunImage;
//   displayName = "Chaingun";
//   displayMode = "Shrike";
// --- End added properties (ST)
//
//};
//datablock ShapeBaseImageData(NerfGunChaingunImage) : SuperChaingunImage // -- inherits blaster properties except
//{                                                               // for the ones that are redefined (ST)
//   item = NerfGunChaingun;
//
// <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Added properties to track images (ST)
//   realName = SuperChaingun;
//   nextMode = NerfBallChaingunImage;
//   displayName = "Chaingun";
//   displayMode = "Shrike";
// --- End added properties (ST)
//
//};
// datablock ShapeBaseImageData(NerfBallChaingunImage) : SuperChaingunImage // -- inherits blaster properties except
//{                                                               // for the ones that are redefined (ST)
//   item = NerfBallChaingun;
//
// <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Added properties to track images (ST)
//   realName = SuperChaingun;
//   nextMode = MeteorChaingunImage;
//   displayName = "Chaingun";
//   displayMode = "Gauss";
// --- End added properties (ST)
//
//};
// datablock ShapeBaseImageData(MeteorChaingunImage) : SuperChaingunImage // -- inherits blaster properties except
//{                                                               // for the ones that are redefined (ST)
//   item = MeteorChaingun;
//
// <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Added properties to track images (ST)
//   realName = SuperChaingun;
//   nextMode = SuperChaingunImage;
//   displayName = "Chaingun";
//   displayMode = "Gauss";
// --- End added properties (ST)
//
//};
//
///------------------------
//datablock ItemData(SChaingun) : SuperChaingun
//{
//   image = SChaingunImage;
//};
//datablock ItemData(BomberChaingun) : SuperChaingun
//{
//   image = BomberChaingunImage;
//};
//datablock ItemData(BellyTurretChaingun) : SuperChaingun
//{
//   image = BellyTurretChaingunImage;
//};
//datablock ItemData(FlamerChaingun) : SuperChaingun
//{
//   image = FlamerChaingunImage;
//};
//datablock ItemData(FlakChaingun) : SuperChaingun
//{
//   image = FlakChaingunImage;
//};
//
//datablock ItemData(MortarChaingun) : SuperChaingun
//{
//   image = MortarChaingunImage;
//};
//datablock ItemData(NerfBallChaingun) : SuperChaingun
//{
//   image = NerfBallChaingunImage;
//};
//datablock ItemData(NerfGunChaingun) : SuperChaingun
//{
//   image = NerfGunChaingunImage;
//};
//function SChaingunImage::onFire(%data, %obj, %slot)
//{
//   %data.lightStart = getSimTime();
//
//   %vehicle = 0;
//
//     %p = new("LinearFlareProjectile")()
//     {
//         dataBlock        = "IonPulse";
//         initialDirection = %obj.getMuzzleVector(%slot);
//         initialPosition  = %obj.getMuzzlePoint(%slot);
//         sourceObject     = %obj;
//         sourceSlot       = %slot;
//         vehicleObject    = %vehicle;
//      };
//
//   if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile)
//      %obj.lastProjectile.delete();
//
//   %obj.lastProjectile = %p;
//   %obj.deleteLastProjectile = %data.deleteLastProjectile;
//   MissionCleanup.add(%p);
//
//   %obj.decInventory(%data.ammo,1);
//   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//
//   return %p;
//}
//datablock ItemData(ChaingunGauss) : SuperChaingun
//{
//   image = ChaingunGaussImage;
//};
//datablock ItemData(MeteorChaingun) : SuperChaingun
//{
//   image = MeteorChaingunImage;
//};
//function ChaingunGaussImage::onFire(%data, %obj, %slot)
//{
//   %data.lightStart = getSimTime();
//
//   %vehicle = 0;
//     %p = new("TracerProjectile")()
//     {
//         dataBlock        = "ExpBullets";
//         initialDirection = %obj.getMuzzleVector(%slot);
//         initialPosition  = %obj.getMuzzlePoint(%slot);
//         sourceObject     = %obj;
//         sourceSlot       = %slot;
//         vehicleObject    = %vehicle;
//      };
//
//   if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile)
//      %obj.lastProjectile.delete();
//
//   %obj.lastProjectile = %p;
//   %obj.deleteLastProjectile = %data.deleteLastProjectile;
//   MissionCleanup.add(%p);
//   %obj.decInventory(%data.ammo,1);
//   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//   %p = createEmitter(%obj.getMuzzlePoint(0),"ChaingunImpactSmoke","0 0 1");
//   schedule(4000,0,killit,%p);
//   return %p;
//}
//function FlamerChaingunImage::onFire(%data, %obj, %slot)
//{
//   %data.lightStart = getSimTime();
//
//   %vehicle = 0;
//
//     %p = new("LinearFlareProjectile")()
//     {
//         dataBlock        = "Flame";
//         initialDirection = %obj.getMuzzleVector(%slot);
//         initialPosition  = %obj.getMuzzlePoint(%slot);
//         sourceObject     = %obj;
//         sourceSlot       = %slot;
//         vehicleObject    = %vehicle;
//      };
//
//   if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile)
//      %obj.lastProjectile.delete();
//
//   %obj.lastProjectile = %p;
//   %obj.deleteLastProjectile = %data.deleteLastProjectile;
//   MissionCleanup.add(%p);
//   %obj.decInventory(%data.ammo,1);
//   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//
//   return %p;
//}
//function BomberChaingunImage::onFire(%data, %obj, %slot)
//{
//   %data.lightStart = getSimTime();
//
//   %vehicle = 0;
//
//     %p = new("BombProjectile")()
//     {
//         dataBlock        = "BomberBomb";
//         initialDirection = %obj.getMuzzleVector(%slot);
//         initialPosition  = %obj.getMuzzlePoint(%slot);
//         sourceObject     = %obj;
//         sourceSlot       = %slot;
//         vehicleObject    = %vehicle;
//      };
//
//   if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile)
//      %obj.lastProjectile.delete();
//
//   %obj.lastProjectile = %p;
//   %obj.deleteLastProjectile = %data.deleteLastProjectile;
//   MissionCleanup.add(%p);
//   %obj.decInventory(%data.ammo,1);
//   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//
//   return %p;
//}
//function FlakChaingunImage::onFire(%data, %obj, %slot)
//{
//   %data.lightStart = getSimTime();
//
//   %vehicle = 0;
//
//     %p = new("SeekerProjectile")()
//     {
//         dataBlock        = "AbramMissile";
//         initialDirection = %obj.getMuzzleVector(%slot);
//         initialPosition  = %obj.getMuzzlePoint(%slot);
//         sourceObject     = %obj;
//         sourceSlot       = %slot;
//         vehicleObject    = %vehicle;
//      };
//
//   if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile)
//      %obj.lastProjectile.delete();
//
//   %obj.lastProjectile = %p;
//   %obj.deleteLastProjectile = %data.deleteLastProjectile;
//   MissionCleanup.add(%p);
//   %obj.decInventory(%data.ammo,1);
//   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//
//   return %p;
//}
//function BellyTurretChaingunImage::onFire(%data, %obj, %slot)
//{
//   %data.lightStart = getSimTime();
//
//   %vehicle = 0;
//
//     %p = new("LinearFlareProjectile")()
//     {
//         dataBlock        = "BomberFusionBolt";
//         initialDirection = %obj.getMuzzleVector(%slot);
//         initialPosition  = %obj.getMuzzlePoint(%slot);
//         sourceObject     = %obj;
//         sourceSlot       = %slot;
//         vehicleObject    = %vehicle;
//      };
//
//   if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile)
//      %obj.lastProjectile.delete();
//
//   %obj.lastProjectile = %p;
//   %obj.deleteLastProjectile = %data.deleteLastProjectile;
//   MissionCleanup.add(%p);
//   %obj.decInventory(%data.ammo,1);
//   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//
//   return %p;
//}
//
//------
// function MortarChaingunImage::onFire(%data, %obj, %slot)
//{
//   %data.lightStart = getSimTime();
//
//   %vehicle = 0;
//
//     %p = new("GrenadeProjectile")()
//     {
//         dataBlock        = "MortarShot";
//         initialDirection = %obj.getMuzzleVector(%slot);
//         initialPosition  = %obj.getMuzzlePoint(%slot);
//         sourceObject     = %obj;
//         sourceSlot       = %slot;
//         vehicleObject    = %vehicle;
//      };
//
//   if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile)
//      %obj.lastProjectile.delete();
//
//   %obj.lastProjectile = %p;
//   %obj.deleteLastProjectile = %data.deleteLastProjectile;
//   MissionCleanup.add(%p);
//   %obj.decInventory(%data.ammo,1);
//   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//
//   return %p;
//}
//function NerfBallChaingunImage::onFire(%data, %obj, %slot)
//{
//   %data.lightStart = getSimTime();
//
//   %vehicle = 0;
//
//     %p = new("GrenadeProjectile")()
//     {
//         dataBlock        = "NerfBall";
//         initialDirection = %obj.getMuzzleVector(%slot);
//         initialPosition  = %obj.getMuzzlePoint(%slot);
//         sourceObject     = %obj;
//         sourceSlot       = %slot;
//         vehicleObject    = %vehicle;
//      };
//
//   if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile)
//      %obj.lastProjectile.delete();
//
//   %obj.lastProjectile = %p;
//   %obj.deleteLastProjectile = %data.deleteLastProjectile;
//   MissionCleanup.add(%p);
//   %obj.decInventory(%data.ammo,1);
//   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//
//   return %p;
//}
//function MeteorChaingunImage::onFire(%data, %obj, %slot)
//{
//   %data.lightStart = getSimTime();
//
//   %vehicle = 0;
//
//     %p = new("GrenadeProjectile")()
//     {
//         dataBlock        = "JTLMeteorStormFireball";
//         initialDirection = %obj.getMuzzleVector(%slot);
//         initialPosition  = %obj.getMuzzlePoint(%slot);
//         sourceObject     = %obj;
//         sourceSlot       = %slot;
//         vehicleObject    = %vehicle;
//      };
//
//   if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile)
//      %obj.lastProjectile.delete();
//
//   %obj.lastProjectile = %p;
//   %obj.deleteLastProjectile = %data.deleteLastProjectile;
//   MissionCleanup.add(%p);
//   %obj.decInventory(%data.ammo,1);
//   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//
//   return %p;
//}
//function NerfGunChaingunImage::onFire(%data, %obj, %slot)
//{
//   %data.lightStart = getSimTime();
//
//   %vehicle = 0;
//
//     %p = new("LinearFlareProjectile")()
//     {
//         dataBlock        = "NerfBolt";
//         initialDirection = %obj.getMuzzleVector(%slot);
//         initialPosition  = %obj.getMuzzlePoint(%slot);
//         sourceObject     = %obj;
//         sourceSlot       = %slot;
//         vehicleObject    = %vehicle;
//      };
//
//   if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile)
//      %obj.lastProjectile.delete();
//
//   %obj.lastProjectile = %p;
//   %obj.deleteLastProjectile = %data.deleteLastProjectile;
//   MissionCleanup.add(%p);
//   %obj.decInventory(%data.ammo,1);
//   // AI hook
//   if(%obj.client)
//      %obj.client.projectile = %p;
//
//   return %p;
//}
//datablock AudioProfile(CustomSoundFightMusic1)
//{
 //  filename    = "fx/special/Fight01.wav";
 //  description = AudioClosest3d;
 //  preload = true;

//};
///datablock AudioProfile(CustomSoundFightMusic2)
//{
//   filename    = "fx/special/Fight02.wav";
//   description = AudioClosest3d;
//   preload = true;

//};
//datablock AudioProfile(CustomSoundFightMusic3)
//{
//   filename    = "fx/special/Fight03.wav";
//   description = AudioClosest3d;
//   preload = true;
//
//};
// datablock AudioProfile(CustomSoundFightMusic4)
//{
//   filename    = "fx/special/Fight05.wav";
//   description = AudioClosest3d;
///   preload = true;
//
//};
//datablock AudioProfile(CustomSoundTechnoMusic1)
//{
//   filename    = "fx/special/TheLostTomb.wav";
//   description = AudioClosest3d;
//   preload = true;
//
//};
datablock AudioProfile(WaterGenOff)
{
   filename    = "fx/Bonuses/Nouns/snake.wav";
   description = AudioClosest3d;
   preload = true;

};
// datablock SeekerProjectileData(XencorMissile)
//{
//   projectileShapeName = "weapon_missile_projectile.dts";
//   scale = "20 30 20";
//   faceViewer = true;
//   hasDamageRadius     = true;
//   indirectDamage      = 5000.0;
//   damageRadius        = 1.0;
//   radiusDamageType    = $DamageType::Missile;
//   kickBackStrength    = 5;
//
//   explosion           = "UnderwaterMortarExplosion";
//   splash              = MissileSplash;
//   velInheritFactor    = 1.0;    // to compensate for slow starting velocity, this value
//                                 // is cranked up to full so the missile doesn't start
//                                 // out behind the player when the player is moving
//                                 // very quickly - bramage
//
//   baseEmitter         = NuclearSmokeEmitter;
//   delayEmitter        = NuclearFireEmitter;
//   puffEmitter         = MissilePuffEmitter;
//   bubbleEmitter       = GrenadeBubbleEmitter;
//   bubbleEmitTime      = 1.0;
//
//   exhaustEmitter      = MissileLauncherExhaustEmitter;
//   exhaustTimeMs       = 300;
//   exhaustNodeName     = "muzzlePoint1";
//
//   lifetimeMS          = 6000;
//   muzzleVelocity      = 10.0;
//   maxVelocity         = 50.0;
//   turningSpeed        = 110.0;
//   acceleration        = 140.0;
//
//   proximityRadius     = 3;
//
//   terrainAvoidanceSpeed         = 180;
//   terrainScanAhead              = 25;
//   terrainHeightFail             = 12;
//   terrainAvoidanceRadius        = 100;
//
//   flareDistance = 200;
//   flareAngle    = 30;
//
//   sound = MissileProjectileSound;
//
//   hasLight    = true;
//   lightRadius = 5.0;
//   lightColor  = "0.2 0.05 0";
//
//   useFlechette = false;
//   flechetteDelayMs = 550;
//   casingDeb = FlechetteDebris;
//
//   explodeOnWaterImpact = false;
//};

function GameBase::clearTarget() {
// stops console spam =/
}



