Make overheating use bullet mass in grains introduced by ab

This commit is contained in:
esteldunedain 2015-04-05 20:11:42 -03:00
parent 100686d34a
commit 038c871356
2 changed files with 3 additions and 51 deletions

View File

@ -129,52 +129,3 @@ class CfgWeapons {
ACE_Overheating_JamChance[] = {0, 0.0003, 0.0015, 0.0075};
};
};
class CfgAmmo {
class BulletCore;
class BulletBase : BulletCore {
ACE_BulletMass = 0; // Bullet mass in grams
};
// Rifle and MG rounds
class B_556x45_Ball : BulletBase {
ACE_BulletMass = 4.1; // 5.56x45 NATO
};
class B_65x39_Caseless : BulletBase {
ACE_BulletMass = 8; // 6.5mm Grendel
};
class B_762x51_Ball : BulletBase {
ACE_BulletMass = 10; // 7.62x51 NATO
};
class ACE_B_762x51_M118LR : B_762x51_Ball {
ACE_BulletMass = 11; // 7.62x51 NATO M118
};
class B_127x99_Ball : BulletBase {
ACE_BulletMass = 42; // 12.7×99mm NATO (.50 BMG)
};
class B_127x108_Ball : BulletBase {
ACE_BulletMass = 48.3; // 12.7x108
};
class B_408_Ball : BulletBase {
ACE_BulletMass = 27; // .408 Cheyenne Tactical
};
// Pistol Rounds
class B_9x21_Ball : BulletBase {
ACE_BulletMass = 7.45; // 9×21mm IMI
};
class B_9x19_Ball : B_9x21_Ball {
ACE_BulletMass = 7.45; // 9×19mm Parabellum
};
class B_127x33_Ball : BulletBase {
ACE_BulletMass = 21; // .50 AE
};
class B_45ACP_Ball : BulletBase {
ACE_BulletMass = 12; // .45 ACP
};
};

View File

@ -36,9 +36,10 @@ _temperature = _overheat select 0;
_time = _overheat select 1;
// Get physical parameters
_bulletMass = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_BulletMass");
// Bullet mass is read from config in grains and converted to grams
_bulletMass = (getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_BulletMass")) * 0.06480;
if (_bulletMass == 0) then {
// If the bullet mass is not configured, estimate it
// If the bullet mass is not configured, estimate it directly in grams
_bulletMass = 3.4334 + 0.5171 * (getNumber (configFile >> "CfgAmmo" >> _ammo >> "hit") + getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber"));
};
_energyIncrement = 0.75 * 0.0005 * _bulletMass * (vectorMagnitudeSqr _velocity);