//bushido's recoil explosions
datablock ExplosionData(QuakeLittleRecoilExplosion)
{
   explosionShape = "";

   lifeTimeMS = 150;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = true;
  camShakeFreq = "1 1 1";
  camShakeAmp = "0.1 0.3 0.2";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;
};

//particles and things
datablock ParticleData(FNPImpactSparkTrailParticle)
{
    dragCoefficient      = 0;
    gravityCoefficient   = 0;
    inheritedVelFactor   = 0;
    constantAcceleration = 0.0;
    lifetimeMS           = 500;
    lifetimeVarianceMS   = 100;
    textureName          = "base/data/particles/dot";
    spinSpeed        = 0.0;
    spinRandomMin        = 0.0;
    spinRandomMax        = 0.0;

	colors[0]	= "1 0.9 0 0.5";
	colors[1]	= "1 0.7 0.4 1.0";
	colors[2]	= "0.7 0.5 0.2 0";

    sizes[0]      = 0.05;
    sizes[1]      = 0.025;
    sizes[2]      = 0.0;

   times[0] = 0.0;
   times[1] = 0.5;
   times[2] = 1.0;

   useInvAlpha = false;
};

datablock ParticleEmitterData(FNPImpactSparkTrailEmitter)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 0;
   velocityVariance = 0;
   ejectionOffset   = 0;
   thetaMin         = 0;
   thetaMax         = 20;
   phiReferenceVel  = 180;
   phiVariance      = 360;
   overrideAdvance = false;

   particles = "FNPImpactSparkTrailParticle";
};

datablock DebrisData(FNPSparkDebris)
{
	render2D = true;
	emitters[0] = "FNPImpactSparkTrailEmitter";
	lifetime = 1.0;
	velocity = 4.5;
	velocityVariance = 1.0;
	elasticity = 0.5;
	friction = 0;
	numBounces = 6;
	staticOnMaxBounce = true;
	snapOnMaxBounce = false;

	gravModifier = 2;
};

datablock DebrisData(FNPDebrisFleckDebris)
{
	textureName = "./graphics/impactDebrisFleck";
	render2D = true;
	lifetime = 3.0;
	minSpinSpeed = -400.0;
	maxSpinSpeed = 200.0;
	velocity = 3.0;
	velocityVariance = 1.0;
	elasticity = 0.6;
	friction = 0.0;
	numBounces = 2;
	staticOnMaxBounce = true;
	snapOnMaxBounce = false;

	gravModifier = 2;
};

datablock ExplosionData(FNPImpactDebrisExplosion)
{
   delayMS   = 10;
	
   faceViewer     = true;
   explosionScale = "1 1 1";
   
   debris = FNPDebrisFleckDebris;
   debrisNum = 1;
   debrisNumVariance = 3;
   debrisVelocity = 1;
   debrisVelocityVariance = 0.5;
   
   uiName = "FNP Debris";
};

datablock ParticleData(FNPImpactPuffParticle)
{
    dragCoefficient      = 2;
    gravityCoefficient   = -0.05;
    inheritedVelFactor   = -5;
    constantAcceleration = 0.0;
    lifetimeMS           = 6500;
    lifetimeVarianceMS   = 100;
    textureName          = "./graphics/impactPuff";
    spinSpeed        = 200.0;
    spinRandomMin        = -800.0;
    spinRandomMax        = 800.0;

    colors[0]     = "0.2 0.2 0.2 0.3";
    colors[1]     = "0.1 0.1 0.1 0.2";
    colors[2]     = "0.05 0.05 0.05 0.1";
    colors[3]     = "0.0 0.0 0.0 0.0";

    sizes[0]      = 2.5;
    sizes[1]      = 1.7;
    sizes[2]      = 0.2;
    sizes[3]      = 0.0;

   times[0] = 0.0;
   times[1] = 0.1;
   times[2] = 0.5;
   times[3] = 1.0;

   useInvAlpha = false;
};

datablock ParticleEmitterData(FNPImpactPuffEmitter)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 0.5;
   velocityVariance = 0.5;
   ejectionOffset   = 0.2;
   thetaMin         = 0;
   thetaMax         = 20;
   phiReferenceVel  = 180;
   phiVariance      = 360;
   overrideAdvance = false;

   particles = "FNPImpactPuffParticle";
};

datablock ExplosionData(FNPExplosion)
{
   lifeTimeMS = 150;

   particleEmitter = FNPImpactPuffEmitter;
   particleDensity = 20;
   particleRadius = 0.2;

   faceViewer     = true;
   explosionScale = "1 1 1";
   
   debris = FNPSparkDebris;
   debrisNum = 3;
   debrisNumVariance = 3;
   debrisVelocity = 1;
   debrisVelocityVariance = 0.5;

   shakeCamera = false;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 3;
   lightEndRadius = 3;
   lightStartColor = "1 0.8 0";
   lightEndColor = "0 0 0";
};

datablock ParticleData(FNPFireGlowParticle)
{
    dragCoefficient      = 0;
    gravityCoefficient   = 0;
    inheritedVelFactor   = 0;
    constantAcceleration = 0.0;
    lifetimeMS           = 40;
    lifetimeVarianceMS   = 0;
    textureName          = "./graphics/muzzleFlashGlow";
    spinSpeed        = 9000.0;
    spinRandomMin        = -3000.0;
    spinRandomMax        = 3000.0;

    colors[0]     = "1.0 0.5 0 0.9";
    colors[1]     = "0.9 0.4 0 0.8";
    colors[2]     = "1 0.5 0.2 0.6";
    colors[3]     = "1 0.5 0.2 0.4";

    sizes[0]      = 1.5;
    sizes[1]      = 0.7;
    sizes[2]      = 0.4;
    sizes[3]      = 0.0;

   times[0] = 0.0;
   times[1] = 0.1;
   times[2] = 0.5;
   times[3] = 1.0;

   useInvAlpha = false;
};

datablock ParticleEmitterData(FNPFireGlowEmitter)
{
   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 64.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0.2;
   thetaMin         = 0;
   thetaMax         = 1;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;

   particles = "FNPFireGlowParticle";
};

datablock ParticleData(FNPFireFlameParticle)
{
    dragCoefficient      = 0;
    gravityCoefficient   = 0;
    inheritedVelFactor   = 0;
    constantAcceleration = 0.0;
    lifetimeMS           = 20;
    lifetimeVarianceMS   = 0;
    textureName          = "./graphics/muzzleFlashFlameP";
    spinSpeed        = 0.0;
    spinRandomMin        = -50.0;
    spinRandomMax        = 50.0;

    colors[0]     = "1.0 0.5 0 0.9";
    colors[1]     = "0.9 0.4 0 0.8";
    colors[2]     = "1 0.5 0.2 0.6";
    colors[3]     = "1 0.5 0.2 0.4";

    sizes[0]      = 2.0;
    sizes[1]      = 2.5;
    sizes[2]      = 0.5;
    sizes[3]      = 0.0;

   times[0] = 0.0;
   times[1] = 0.1;
   times[2] = 0.5;
   times[3] = 1.0;

   useInvAlpha = false;
};

datablock ParticleEmitterData(FNPFireFlameEmitter)
{
   ejectionPeriodMS = 2;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 1;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;

   particles = "FNPFireFlameParticle";
};

datablock ParticleData(FNPSDFireBurstParticle)
{
    dragCoefficient      = 0;
    gravityCoefficient   = 0;
    inheritedVelFactor   = 0;
    constantAcceleration = 0.0;
    lifetimeMS           = 20;
    lifetimeVarianceMS   = 0;
    textureName          = "./graphics/muzzleFlashBurstP";
    spinSpeed        = 1000.0;
    spinRandomMin        = -1000.0;
    spinRandomMax        = 1000.0;

    colors[0]     = "1.0 0.5 0 0.9";
    colors[1]     = "0.9 0.4 0 0.8";
    colors[2]     = "1 0.5 0.2 0.6";
    colors[3]     = "1 0.5 0.2 0.4";

    sizes[0]      = 4.0;
    sizes[1]      = 4.5;
    sizes[2]      = 1.5;
    sizes[3]      = 0.0;

   times[0] = 0.0;
   times[1] = 0.1;
   times[2] = 0.5;
   times[3] = 1.0;

   useInvAlpha = false;
};

datablock ParticleEmitterData(FNPSDFireBurstEmitter)
{
   ejectionPeriodMS = 2;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 1;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;

   particles = "FNPSDFireBurstParticle";
};

datablock ParticleData(FNPSDFirePuffParticle)
{
    dragCoefficient      = 2;
    gravityCoefficient   = -0.15;
    inheritedVelFactor   = -5;
    constantAcceleration = 0.0;
    lifetimeMS           = 6500;
    lifetimeVarianceMS   = 100;
    textureName          = "./graphics/muzzleFlashSmoke";
    spinSpeed        = 100.0;
    spinRandomMin        = -500.0;
    spinRandomMax        = 500.0;

    colors[0]     = "0.2 0.2 0.2 0.4";
    colors[1]     = "0.1 0.1 0.1 0.2";
    colors[2]     = "0.05 0.05 0.05 0.1";
    colors[3]     = "0.0 0.0 0.0 0.0";

    sizes[0]      = 2.5;
    sizes[1]      = 1.7;
    sizes[2]      = 0.2;
    sizes[3]      = 0.0;

   times[0] = 0.0;
   times[1] = 0.1;
   times[2] = 0.5;
   times[3] = 1.0;

   useInvAlpha = false;
};

datablock ParticleEmitterData(FNPSDFirePuffEmitter)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 0.5;
   velocityVariance = 0.5;
   ejectionOffset   = 0.2;
   thetaMin         = 0;
   thetaMax         = 20;
   phiReferenceVel  = 20;
   phiVariance      = 360;
   overrideAdvance = false;

   particles = "FNPSDFirePuffParticle";
};

datablock ParticleData(FNPFireSmokeParticle)
{
    dragCoefficient      = 0;
    gravityCoefficient   = -0.2;
    inheritedVelFactor   = 0;
    constantAcceleration = 0.0;
    lifetimeMS           = 2000;
    lifetimeVarianceMS   = 0;
    textureName          = "./graphics/muzzleFlashSmoke";
    spinSpeed        = 800.0;
    spinRandomMin        = -200.0;
    spinRandomMax        = 100.0;

    colors[0]     = "0.2 0.2 0.25 0.2";
    colors[1]     = "0.4 0.4 0.4 0.15";
    colors[2]     = "0.7 0.7 0.7 0.05";
    colors[3]     = "0.9 0.9 0.9 0.02";

    sizes[0]      = 0.5;
    sizes[1]      = 0.3;
    sizes[2]      = 0.2;
    sizes[3]      = 0.0;

   times[0] = 0.0;
   times[1] = 0.2;
   times[2] = 0.9;
   times[3] = 1.0;

   useInvAlpha = false;
};

datablock ParticleEmitterData(FNPFireSmokeEmitter)
{
   ejectionPeriodMS = 10;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 10;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;

   particles = "FNPFireSmokeParticle";
};

datablock ParticleData(FNPTrailParticle)
{
	dragCoefficient		= 3.0;
	windCoefficient		= 0.0;
	gravityCoefficient	= 0.0;
	inheritedVelFactor	= 0.0;
	constantAcceleration	= 0.0;
	lifetimeMS		= 800;
	lifetimeVarianceMS	= 20;
	spinSpeed		= 10.0;
	spinRandomMin		= -50.0;
	spinRandomMax		= 50.0;
	useInvAlpha		= false;

	textureName		= "base/data/particles/dot";
	//animTexName		= "~/data/particles/dot";

	// Interpolation variables
	colors[0]	= "1 1 0 0.5";
	colors[1]	= "1 1 0.4 1.0";
	colors[2]	= "0.7 0.7 0.7 0";
	sizes[0]	= 0.3;
	sizes[1]	= 0.15;
	sizes[2]	= 0.0;
	times[0]	= 0.0;
	times[1]	= 0.02;
	times[2]	= 1.0;
};

datablock ParticleEmitterData(FNPTrailEmitter)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 0; //0.25;
   velocityVariance = 0; //0.10;
   ejectionOffset = 0;
   thetaMin         = 0.0;
   thetaMax         = 90.0;  

   particles = FNPTrailParticle;
};

datablock ParticleData(FNPSDTrailParticle)
{
	dragCoefficient		= 3.0;
	windCoefficient		= 0.0;
	gravityCoefficient	= -0.1;
	inheritedVelFactor	= 0.0;
	constantAcceleration	= 0.0;
	lifetimeMS		= 800;
	lifetimeVarianceMS	= 20;
	spinSpeed		= 10.0;
	spinRandomMin		= -50.0;
	spinRandomMax		= 50.0;
	useInvAlpha		= false;

	textureName		= "base/data/particles/dot";
	//animTexName		= "~/data/particles/dot";

	// Interpolation variables
	colors[0]	= "0.8 0.8 0.8 1.0";
	colors[1]	= "0.5 0.5 0.5 0.1";
	colors[2]	= "0.1 0.1 0.1 0";
	sizes[0]	= 0.3;
	sizes[1]	= 0.15;
	sizes[2]	= 0.0;
	times[0]	= 0.0;
	times[1]	= 0.1;
	times[2]	= 1.0;
};

datablock ParticleEmitterData(FNPSDTrailEmitter)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 0; //0.25;
   velocityVariance = 0; //0.10;
   ejectionOffset = 0;
   thetaMin         = 0.0;
   thetaMax         = 90.0;  

   particles = FNPSDTrailParticle;
};

datablock DebrisData(FNPShellDebris)
{
	shapeFile = "./pistolA/fnpShell.dts";
	lifetime = 5.0;
	minSpinSpeed = -400.0;
	maxSpinSpeed = 200.0;
	elasticity = 0.5;
	friction = 0.2;
	numBounces = 3;
	staticOnMaxBounce = true;
	snapOnMaxBounce = false;
	fade = true;

	gravModifier = 2;
};