datablock ParticleData( PDebrisSmokeParticle2 )
{
   dragCoeffiecient     = 1.0;
   gravityCoefficient   = 0.0;
   inheritedVelFactor   = 0.2;

   lifetimeMS           = 2000;
   lifetimeVarianceMS   = 100;

   textureName          = "special/Explosion/Exp_0024";

   useInvAlpha =     false;

   spinRandomMin = -360.0;
   spinRandomMax = 360.0;

   colors[0]     = "1 0.3 0.1 1.0";
   colors[1]     = "0.8 0.2 0.1 0.8";
   colors[2]     = "0.9 0.4 0.1 0.5";
   sizes[0]      = 2.2;
   sizes[1]      = 0.9;
   sizes[2]      = 1.05;
   times[0]      = 0.1;
   times[1]      = 0.5;
   times[2]      = 2.0;
};

datablock ParticleEmitterData( PFireworkSmokeEmitter2 )
{
   ejectionPeriodMS =12;
   periodVarianceMS = 1;

   ejectionVelocity = 1.0;  // A little oomph at the back end
   velocityVariance = 0.9;

   thetaMin         = 0.0;
   thetaMax         = 180.0;

   particles = "PDebrisSmokeParticle2";
};


datablock DebrisData( PalmTreeDebris2 )
{
   emitters[0] = PFireworkSmokeEmitter2;

   explodeOnMaxBounce = true;

   elasticity = 0.4;
   friction = 0.6;

   lifetime = 1.4;
   lifetimeVariance = 0;

   numBounces = 1;
   bounceVariance = 0;

   staticOnMaxBounce = true;

   useRadiusMass = true;
   baseRadius = 1.0;

   velocity = 80.0;
   velocityVariance = 7.0;
};
datablock ExplosionData(PalmFireworkExplosion2)
{
   soundProfile   = FireworksGunExpSound;

   subExplosion[0] = DiscExplosion;

   debris = PalmTreeDebris2;
   debrisThetaMin = 0;
   debrisThetaMax = 180;
   debrisNum = 40;
   debrisVelocity = 30.0;
   debrisVelocityVariance = 20.0;

   shakeCamera = true;
   camShakeFreq = "12.0 13.0 11.0";
   camShakeAmp = "35.0 35.0 35.0";
   camShakeDuration = 1.0;
   camShakeRadius = 15.0;
};
datablock LinearFlareProjectileData(NewPalmTreeTrailFirework)
{
   projectileShapeName = "weapon_missile_projectile.dts";
   scale               = "3.0 5.0 3.0";
   faceViewer          = true;
   directDamage        = 0.6;
   hasDamageRadius     = true;
   indirectDamage      = 0.3;
   damageRadius        = 30;
   kickBackStrength    = 4000.0;
   radiusDamageType    = $DamageType::Explosion;

   explosion           = "PalmFireworkExplosion2";
//   baseEmitter         = FireworksGunEmitter;

   dryVelocity       = 80.0;
   wetVelocity       = -1;
   velInheritFactor  = 0.3;
   fizzleTimeMS      = 4100;
   lifetimeMS        = 4100;
   explodeOnDeath    = true;
   reflectOnWaterImpactAngle = 0.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = -1;

   //activateDelayMS = 100;
   activateDelayMS = -1;

   baseEmitter = FireworksTrailEmitter;

   size[0]           = 0.0;
   size[1]           = 0.0;
   size[2]           = 0.0;


   numFlares         = 0;
   flareColor        = "0.0 0.0 0.0";
   flareModTexture   = "flaremod";
   flareBaseTexture  = "flarebase";

	sound        = PlasmaProjectileSound;
   fireSound    = PlasmaFireSound;
   wetFireSound = PlasmaFireWetSound;

   hasLight    = true;
   lightRadius = 3.0;
   lightColor  = "1 0.75 0.25";
};
//datablock ParticleData(CircleSSmokeParticle)
//{
//   dragCoeffiecient     = 0;
//   gravityCoefficient   = 0.0;   // rises slowly
//   inheritedVelFactor   = 5;
//
//   lifetimeMS           = 1000; // lasts 2 second
//   lifetimeVarianceMS   = 400;   // ...more or less
//
//   textureName          = "special/underwaterSpark";
//
//   useInvAlpha = 0;
//   spinRandomMin = -30.0;
//   spinRandomMax = 30.0;
//
//   colors[0]     = "0.2 0.0 0.9 0.6";
//   colors[1]     = "0.0 0.7 0.0 0.5";
//   colors[2]     = "0.0 0.2 0.0 0.4";
//
//   sizes[0]      = 5;
//   sizes[1]      = 10.0;
//   sizes[2]      = 10.0;
//
//   times[0]      = 0.0;
//   times[1]      = 0.5;
//   times[2]      = 1.0;
//};
//
//datablock ParticleEmitterData(CircleFireworksEmitter)
//{
//   ejectionPeriodMS = 4;
//   periodVarianceMS = 0;
//
//   ejectionVelocity = 60.25;
//   velocityVariance = 0;
//
//   thetaMin         = 0.0;
//   thetaMax         = 180.0;
//   orientParticles = 1;
//
//   particles = "CircleSSmokeParticle";
//};

datablock ExplosionData(CircleFireworkExplosion)
{
   soundProfile   = FireworksGunExpSound;

//   emitter[0] = CircleFireworksEmitter;

   debris = PalmTreeDebris2;
   debrisThetaMin = 60;
   debrisThetaMax = 60;
   debrisNum = 40;
   debrisVelocity = 60.0;
   debrisVelocityVariance = 1.0;

   shakeCamera = true;
   camShakeFreq = "12.0 13.0 11.0";
   camShakeAmp = "35.0 35.0 35.0";
   camShakeDuration = 1.0;
   camShakeRadius = 15.0;
};
datablock LinearFlareProjectileData(CircleFirework)
{
   projectileShapeName = "weapon_missile_projectile.dts";
   scale               = "3.0 5.0 3.0";
   faceViewer          = true;
   directDamage        = 0.0;
   hasDamageRadius     = true;
   indirectDamage      = 0.0;
   damageRadius        = 0;
   kickBackStrength    = 6000.0;
   radiusDamageType    = $DamageType::Explosion;

   explosion           = "CircleFireworkExplosion";
//   baseEmitter         = FireworksGunEmitter;

   dryVelocity       = 95.0;
   wetVelocity       = -1;
   velInheritFactor  = 0.3;
   fizzleTimeMS      = 2100;
   lifetimeMS        = 2100;
   explodeOnDeath    = true;
   reflectOnWaterImpactAngle = 0.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = -1;

   //activateDelayMS = 100;
   activateDelayMS = -1;

   baseEmitter = FireworksGunSmokeEmitter;

   size[0]           = 0.0;
   size[1]           = 0.0;
   size[2]           = 0.0;


   numFlares         = 0;
   flareColor        = "0.0 0.0 0.0";
   flareModTexture   = "flaremod";
   flareBaseTexture  = "flarebase";

	sound        = PlasmaProjectileSound;
   fireSound    = PlasmaFireSound;
   wetFireSound = PlasmaFireWetSound;

   hasLight    = true;
   lightRadius = 3.0;
   lightColor  = "1 0.75 0.25";
};
datablock ParticleData( PDebrisSmokeParticle3 )
{
   dragCoeffiecient     = 1.0;
   gravityCoefficient   = 0.0;
   inheritedVelFactor   = 0.2;

   lifetimeMS           = 1000;
   lifetimeVarianceMS   = 100;

   textureName          = "special/expFlare";

   useInvAlpha =     false;

   spinRandomMin = -60.0;
   spinRandomMax = 60.0;

   colors[0]     = "0.8 0.8 0.8 1.0";
   colors[1]     = "1 1 0.8 0.5";
   colors[2]     = "0.4 0.4 0.4 0.2";
   sizes[0]      = 0.6;
   sizes[1]      = 0.6;
   sizes[2]      = 0.2;
   times[0]      = 0.0;
   times[1]      = 0.5;
   times[2]      = 1.0;
};

datablock ParticleEmitterData( PFireworkSmokeEmitter3 )
{
   ejectionPeriodMS =9;
   periodVarianceMS = 1;

   ejectionVelocity = 1.0;  // A little oomph at the back end
   velocityVariance = 0.2;

   thetaMin         = 0.0;
   thetaMax         = 180.0;

   particles = "PDebrisSmokeParticle3";
};

datablock ParticleData(RedEndParticle)
{
   dragCoeffiecient     = 0.0;
   gravityCoefficient   = -0.2;
   inheritedVelFactor   = 0.0;

   lifetimeMS           = 350;
   lifetimeVarianceMS   = 0;

   textureName          = "special/expFlare";

   useInvAlpha = false;
   spinRandomMin = -160.0;
   spinRandomMax = 160.0;

   animateTexture = 0;

   colors[0]     = "1.0 0.1 0.1 1.0";
   colors[1]     = "1.0 0.1 0.1 1.0";
   colors[2]     = "1.0 0.1 0.1 0.0";
   sizes[0]      = 7.0;
   sizes[1]      = 0.0;
   sizes[2]      = 0.0;
   times[0]      = 0.0;
   times[1]      = 0.2;
   times[2]      = 1.0;
};

datablock ParticleEmitterData(RedEndEmitter)
{
   ejectionPeriodMS = 10;
   periodVarianceMS = 1;

   ejectionVelocity = 0.0;
   velocityVariance = 0.0;

   thetaMin         = 0.0;
   thetaMax         = 0.0;

   particles = "RedEndParticle";
};
datablock ParticleData(BlueEndParticle)
{
   dragCoeffiecient     = 0.0;
   gravityCoefficient   = -0.2;
   inheritedVelFactor   = 0.0;

   lifetimeMS           = 350;
   lifetimeVarianceMS   = 0;

   textureName          = "special/expFlare";

   useInvAlpha = false;
   spinRandomMin = -160.0;
   spinRandomMax = 160.0;

   animateTexture = 0;

   colors[0]     = "0.1 0.1 1 1.0";
   colors[1]     = "0.1 0.1 1 1.0";
   colors[2]     = "0.1 0.1 1 0.0";
   sizes[0]      = 7.0;
   sizes[1]      = 0.0;
   sizes[2]      = 1.0;
   times[0]      = 0.0;
   times[1]      = 0.2;
   times[2]      = 1.0;
};

datablock ParticleEmitterData(BlueEndEmitter)
{
   ejectionPeriodMS = 15;
   periodVarianceMS = 1;

   ejectionVelocity = 0.25;
   velocityVariance = 0.0;

   thetaMin         = 0.0;
   thetaMax         = 20.0;

   particles = "BlueEndParticle";
};
datablock ParticleData(YellowEndParticle)
{
   dragCoeffiecient     = 0.0;
   gravityCoefficient   = -0.2;
   inheritedVelFactor   = 0.0;

   lifetimeMS           = 350;
   lifetimeVarianceMS   = 0;

  textureName          = "special/expFlare";

   useInvAlpha = false;
   spinRandomMin = -160.0;
   spinRandomMax = 160.0;

   animateTexture = 0;

   colors[0]     = "1 1 0.1 1.0";
   colors[1]     = "1 1 0.1 1.0";
   colors[2]     = "1 1 0.1 0.0";
   sizes[0]      = 7.0;
   sizes[1]      = 0.0;
   sizes[2]      = 0.0;
   times[0]      = 0.0;
   times[1]      = 0.2;
   times[2]      = 1.0;
};

datablock ParticleEmitterData(YellowEndEmitter)
{
   ejectionPeriodMS = 15;
   periodVarianceMS = 1;

   ejectionVelocity = 0.25;
   velocityVariance = 0.0;

   thetaMin         = 0.0;
   thetaMax         = 20.0;

   particles = "YellowEndParticle";
};
datablock DebrisData( YellowEndDebris3 )
{
  //
   emitters[0] = YellowEndEmitter;
   emitters[1] = PFireworkSmokeEmitter3;

   explodeOnMaxBounce = true;

   elasticity = 0.4;
   friction = 0.6;

   lifetime = 1.5;
   lifetimeVariance = 0.3;
};
datablock DebrisData( RedEndDebris3 )
{
   emitters[0] = RedEndEmitter;
   emitters[1] = PFireworkSmokeEmitter3;

   explodeOnMaxBounce = true;

   elasticity = 0.4;
   friction = 0.6;

   lifetime = 1.5;
   lifetimeVariance = 0.3;
};
datablock DebrisData( BlueEndDebris3 )
{
  //
   emitters[0] = BlueEndEmitter;
   emitters[1] = PFireworkSmokeEmitter3;

   explodeOnMaxBounce = true;

   elasticity = 0.4;
   friction = 0.6;

   lifetime = 1.5;
   lifetimeVariance = 0.3;
};
datablock ExplosionData(RedEndFireworkExplosion2)
{
   soundProfile   = FireworksGunExpSound;

   subExplosion[0] = PlasmaBoltExplosion;

   debris = RedEndDebris3;
   debrisThetaMin = 0;
   debrisThetaMax = 180;
   debrisNum = 25;
   debrisVelocity = 60.0;
   debrisVelocityVariance = 1.0;

   shakeCamera = true;
   camShakeFreq = "12.0 13.0 11.0";
   camShakeAmp = "35.0 35.0 35.0";
   camShakeDuration = 1.0;
   camShakeRadius = 15.0;
};
datablock ExplosionData(BlueEndFireworkExplosion2)
{
   soundProfile   = FireworksGunExpSound;

   subExplosion[0] = PlasmaBoltExplosion;

   debris = BlueEndDebris3;
   debrisThetaMin = 0;
   debrisThetaMax = 180;
   debrisNum = 25;
   debrisVelocity = 60.0;
   debrisVelocityVariance = 1.0;

   shakeCamera = true;
   camShakeFreq = "12.0 13.0 11.0";
   camShakeAmp = "35.0 35.0 35.0";
   camShakeDuration = 1.0;
   camShakeRadius = 15.0;
};
datablock ExplosionData(YellowEndFireworkExplosion2)
{
   soundProfile   = FireworksGunExpSound;

   subExplosion[0] = PlasmaBoltExplosion;

   debris = YellowEndDebris3;
   debrisThetaMin = 0;
   debrisThetaMax = 180;
   debrisNum = 25;
   debrisVelocity = 60.0;
   debrisVelocityVariance = 1.0;

   shakeCamera = true;
   camShakeFreq = "12.0 13.0 11.0";
   camShakeAmp = "35.0 35.0 35.0";
   camShakeDuration = 1.0;
   camShakeRadius = 15.0;
};

datablock LinearFlareProjectileData(RedEndFirework)
{
   projectileShapeName = "weapon_missile_projectile.dts";
   scale               = "3.0 5.0 3.0";
   faceViewer          = true;
   directDamage        = 0.0;
   hasDamageRadius     = true;
   indirectDamage      = 0.0;
   damageRadius        = 0;
   kickBackStrength    = 6000.0;
   radiusDamageType    = $DamageType::Explosion;

   explosion           = "RedEndFireworkExplosion2";
//   baseEmitter         = FireworksGunEmitter;

   dryVelocity       = 95.0;
   wetVelocity       = -1;
   velInheritFactor  = 0.3;
   fizzleTimeMS      = 2100;
   lifetimeMS        = 2100;
   explodeOnDeath    = true;
   reflectOnWaterImpactAngle = 0.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = -1;

   //activateDelayMS = 100;
   activateDelayMS = -1;

   baseEmitter = FireworksGunSmokeEmitter;

   size[0]           = 0.0;
   size[1]           = 0.0;
   size[2]           = 0.0;


   numFlares         = 0;
   flareColor        = "0.0 0.0 0.0";
   flareModTexture   = "flaremod";
   flareBaseTexture  = "flarebase";

	sound        = PlasmaProjectileSound;
   fireSound    = PlasmaFireSound;
   wetFireSound = PlasmaFireWetSound;

   hasLight    = true;
   lightRadius = 3.0;
   lightColor  = "1 0.75 0.25";
};
datablock LinearFlareProjectileData(BlueEndFirework)
{
   projectileShapeName = "weapon_missile_projectile.dts";
   scale               = "3.0 5.0 3.0";
   faceViewer          = true;
   directDamage        = 0.0;
   hasDamageRadius     = true;
   indirectDamage      = 0.0;
   damageRadius        = 0;
   kickBackStrength    = 6000.0;
   radiusDamageType    = $DamageType::Explosion;

   explosion           = "BlueEndFireworkExplosion2";
//   baseEmitter         = FireworksGunEmitter;

   dryVelocity       = 95.0;
   wetVelocity       = -1;
   velInheritFactor  = 0.3;
   fizzleTimeMS      = 2100;
   lifetimeMS        = 2100;
   explodeOnDeath    = true;
   reflectOnWaterImpactAngle = 0.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = -1;

   //activateDelayMS = 100;
   activateDelayMS = -1;

   baseEmitter = FireworksGunSmokeEmitter;

   size[0]           = 0.0;
   size[1]           = 0.0;
   size[2]           = 0.0;


   numFlares         = 0;
   flareColor        = "0.0 0.0 0.0";
   flareModTexture   = "flaremod";
   flareBaseTexture  = "flarebase";

	sound        = PlasmaProjectileSound;
   fireSound    = PlasmaFireSound;
   wetFireSound = PlasmaFireWetSound;

   hasLight    = true;
   lightRadius = 3.0;
   lightColor  = "1 0.75 0.25";
};
datablock LinearFlareProjectileData(YellowEndFirework)
{
   projectileShapeName = "weapon_missile_projectile.dts";
   scale               = "3.0 5.0 3.0";
   faceViewer          = true;
   directDamage        = 0.0;
   hasDamageRadius     = true;
   indirectDamage      = 0.0;
   damageRadius        = 0;
   kickBackStrength    = 6000.0;
   radiusDamageType    = $DamageType::Explosion;

   explosion           = "YellowEndFireworkExplosion2";
//   baseEmitter         = FireworksGunEmitter;

   dryVelocity       = 95.0;
   wetVelocity       = -1;
   velInheritFactor  = 0.3;
   fizzleTimeMS      = 2100;
   lifetimeMS        = 2100;
   explodeOnDeath    = true;
   reflectOnWaterImpactAngle = 0.0;
   explodeOnWaterImpact      = true;
   deflectionOnWaterImpact   = 0.0;
   fizzleUnderwaterMS        = -1;

   //activateDelayMS = 100;
   activateDelayMS = -1;

   baseEmitter = FireworksGunSmokeEmitter;

   size[0]           = 0.0;
   size[1]           = 0.0;
   size[2]           = 0.0;


   numFlares         = 0;
   flareColor        = "0.0 0.0 0.0";
   flareModTexture   = "flaremod";
   flareBaseTexture  = "flarebase";

	sound        = PlasmaProjectileSound;
   fireSound    = PlasmaFireSound;
   wetFireSound = PlasmaFireWetSound;

   hasLight    = true;
   lightRadius = 3.0;
   lightColor  = "1 0.75 0.25";
};

//datablock ExplosionData(BobcatExplosion)
//{
//   soundProfile   = "";
//
//   explosionShape = "disc_explosion.dts";
//   faceViewer           = true;
//   explosionScale = "0.1 0.1 0.1";
//
//   playSpeed = 5.5;
//
//   sizes[0] = "0.1 0.1 0.1";
//   sizes[1] = "0.3 0.3 0.3";
//   times[0] = 0.0;
//   times[1] = 1.0;
//
//   shakeCamera = true;
//   camShakeFreq = "12.0 13.0 11.0";
//   camShakeAmp = "35.0 35.0 35.0";
//   camShakeDuration = 1.0;
//   camShakeRadius = 15.0;
//};
//datablock ItemData(CrackerJack)
//{
//   shapeFile = "turret_muzzlepoint.dts";
//   hasDamageRadius     = false;
//   explosion = BobcatExplosion;
//};
//datablock GrenadeProjectileData(Bobcat)
//{
//   projectileShapeName = "weapon_chaingun_ammocasing.dts";
//   emitterDelay        = -1;
//   directDamage        = 0;
//   directDamageType    = $DamageType::Default;
//   radiusDamageType    = $DamageType::Default;
//   hasDamageRadius     = false;
//   indirectDamage      = 0;
//   damageRadius        = 3.0;  // used in onExplode()
//   kickBackStrength    = 0;
//   useLensFlare        = false;
//
//   sound 	       = "";
//   explosion           = "";
//   velInheritFactor    = 0.5;
//
//   baseEmitter         = TagExplosionEmitter;
//
//   grenadeElasticity = 0.35;
//   grenadeFriction   = 0.1;
//   armingDelayMS     = 8500;
//   muzzleVelocity    = 40;
//   drag = 0.1;
//   gravityMod = 3.0;
//};
//function Bobcat::onExplode(%data,%projectile,%pos,%mod) {
//for(%i=0;%i<mFloor(getRandom(10,20));%i++) {
//%pos = vectoradd(%pos,getRandom(-5,5) SPC getRandom(-5,5) SPC 0);
//%rot = "0 0 0 1";
//            %deadman = new Item()
//            {
//            datablock = Crackerjack;
//            position = %pos;
//            rotation = %rot;
//             };
//             MissionCleanup.add(%deadman);
//   %sch = getRandom(25,3000);
//   schedule(%sch, 0, detonateGrenade, %deadman);
//   %sound = "fx/weapons/cg_metal" @ mFloor(getRandom(1,4)) @ ".wav";
//
//   %mask = $TypeMasks::PlayerObjectType;
//   InitContainerRadiusSearch(%deadman.getTransform(), 15, %mask);
//   while((%res = containerSearchNext()) != 0)
//       schedule(%sch,0,messageClient,%res.client,0,'~w%1',%sound);
//  }
//}
