<commit_before>//------------------------------------------------------------------------------
// Revenge Of The Cats: Ethernet
// Copyright notices are in the file named COPYING.
//------------------------------------------------------------------------------

exec("./blaster5.sfx.cs");
exec("./blaster5.gfx.cs");
exec("./blaster5.gfx.red.cs");
exec("./blaster5.gfx.blue.cs");

datablock TracerProjectileData(Blaster5PseudoProjectile)
{
	energyDrain = 36;
	lifetime = 1000;
	muzzleVelocity = 200 * $Server::Game.slowpokemod;
	velInheritFactor = 0.5 * $Server::Game.slowpokemod;
};

function Blaster5PseudoProjectile::onAdd(%this, %obj)
{
	%player = %obj.sourceObject;
	%slot = %obj.sourceSlot;
	%image = %player.getMountedImage(%slot);

	%muzzlePoint = %obj.initialPosition;
	%muzzleVector = %obj.initialVelocity;

   %projectile = %image.fireprojectile[0];

   // create the projectile object...
   %p = new Projectile() {
      dataBlock       = %projectile;
      teamId          = %obj.teamId;
      initialVelocity = %muzzleVector;
      initialPosition = %muzzlePoint;
      sourceObject    = %player;
      sourceSlot      = %slot;
      client          = %player.client;
   };
   MissionCleanup.add(%p);

	// no need to ghost pseudo projectile to clients...
	%obj.delete();
}

//-----------------------------------------------------------------------------
// projectile datablock...

datablock ProjectileData(RedBlaster5Projectile)
{
	stat = "blaster";

	// script damage properties...
	impactDamage       = 120;
	impactImpulse      = 2500;
	splashDamage       = 0;
	splashDamageRadius = 0;
	splashImpulse      = 0;
	bypassDamageBuffer = false;

	trackingAgility = 0;

	explodesNearEnemies			= false;
	explodesNearEnemiesRadius	= 2;
	explodesNearEnemiesMask	  = $TypeMasks::PlayerObjectType;

	//sound = Blaster5ProjectileSound;

   projectileShapeName = "share/shapes/rotc/weapons/assaultrifle/projectile2.red.dts";

	explosion             = RedBlaster5ProjectileImpact;
//	bounceExplosion       = RedBlaster5ProjectileBounceExplosion;
	hitEnemyExplosion     = RedBlaster5ProjectileHit;
//	nearEnemyExplosion    = RedBlaster5ProjectileExplosion;
	hitTeammateExplosion  = RedBlaster5ProjectileHit;
//	hitDeflectorExplosion = DiscDeflectedEffect;

	missEnemyEffectRadius = 10;
	missEnemyEffect = RedBlasterProjectileMissedEnemyEffect;

//	particleEmitter = RedBlaster5ProjectileParticleEmitter;
//	laserTrail[0]   = Blaster5ProjectileLaserTrail;<commit_msg>Increase Blaster5's projectile impact impulse from 2500 to 5000.<commit_after>//------------------------------------------------------------------------------
// Revenge Of The Cats: Ethernet
// Copyright notices are in the file named COPYING.
//------------------------------------------------------------------------------

exec("./blaster5.sfx.cs");
exec("./blaster5.gfx.cs");
exec("./blaster5.gfx.red.cs");
exec("./blaster5.gfx.blue.cs");

datablock TracerProjectileData(Blaster5PseudoProjectile)
{
	energyDrain = 36;
	lifetime = 1000;
	muzzleVelocity = 200 * $Server::Game.slowpokemod;
	velInheritFactor = 0.5 * $Server::Game.slowpokemod;
};

function Blaster5PseudoProjectile::onAdd(%this, %obj)
{
	%player = %obj.sourceObject;
	%slot = %obj.sourceSlot;
	%image = %player.getMountedImage(%slot);

	%muzzlePoint = %obj.initialPosition;
	%muzzleVector = %obj.initialVelocity;

   %projectile = %image.fireprojectile[0];

   // create the projectile object...
   %p = new Projectile() {
      dataBlock       = %projectile;
      teamId          = %obj.teamId;
      initialVelocity = %muzzleVector;
      initialPosition = %muzzlePoint;
      sourceObject    = %player;
      sourceSlot      = %slot;
      client          = %player.client;
   };
   MissionCleanup.add(%p);

	// no need to ghost pseudo projectile to clients...
	%obj.delete();
}

//-----------------------------------------------------------------------------
// projectile datablock...

datablock ProjectileData(RedBlaster5Projectile)
{
	stat = "blaster";

	// script damage properties...
	impactDamage       = 120;
	impactImpulse      = 5000;
	splashDamage       = 0;
	splashDamageRadius = 0;
	splashImpulse      = 0;
	bypassDamageBuffer = false;

	trackingAgility = 0;

	explodesNearEnemies			= false;
	explodesNearEnemiesRadius	= 2;
	explodesNearEnemiesMask	  = $TypeMasks::PlayerObjectType;

	//sound = Blaster5ProjectileSound;

   projectileShapeName = "share/shapes/rotc/weapons/assaultrifle/projectile2.red.dts";

	explosion             = RedBlaster5ProjectileImpact;
//	bounceExplosion       = RedBlaster5ProjectileBounceExplosion;
	hitEnemyExplosion     = RedBlaster5ProjectileHit;
//	nearEnemyExplosion    = RedBlaster5ProjectileExplosion;
	hitTeammateExplosion  = RedBlaster5ProjectileHit;
//	hitDeflectorExplosion = DiscDeflectedEffect;

	missEnemyEffectRadius = 10;
	missEnemyEffect = RedBlasterProjectileMissedEnemyEffect;

//	particleEmitter = RedBlaster5ProjectileParticleEmitter;
//	laserTrail[0]   = Blaster5ProjectileLaserTrail;
{'fraction_non_alphanumeric': 0.19731301383597352, 'fraction_numerical': 0.019049528774814518, 'mean_word_length': 2.5527065527065527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3856513', 'n_tokens_mistral': 1703, 'n_tokens_neox': 1562, 'n_words': 265}