Overheating - Add barrel mass config value (#8906)

This commit is contained in:
Drofseh 2022-05-11 16:21:05 -07:00 committed by GitHub
parent e0a3bd65ab
commit 53c0348a15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -81,7 +81,10 @@ private _reloadTime = getNumber (configfile >> "CfgWeapons" >> _weapon >> (_mode
private _closedBolt = getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(closedBolt));
private _barrelMass = METAL_MASS_RATIO * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0;
private _barrelMass = getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(barrelMass));
if (_barrelMass <= 0) then {
_barrelMass = METAL_MASS_RATIO * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0;
};
// Cache the values
_weaponData = [_dispersion, _slowdownFactor, _jamChance, _modes, _muzzle, _reloadTime, _closedBolt, _barrelMass];

View File

@ -53,10 +53,16 @@ class CfgWeapons {
```cpp
class CfgWeapons {
class Rifle_Long_Base_F ;
class Rifle_Base_F;
class Rifle_Long_Base_F;
class MyRifle: Rifle_Base_F {
ace_overheating_closedBolt = 1; // Closed bolt, can cook off from barrel heat.
ace_overheating_barrelMass = 1.5895; // Mass of the area heated by firing, not strictly just the barrel. Higher mass gives slower heat buildup and faster cooling. Default estimation is 55% of weapon weight in kg.
};
class MySniper: Rifle_Long_Base_F {
ace_overheating_closedBolt = 1; // Closed bolt, can cook off from barrel heat.
ace_overheating_closedBolt = 1;
};
class MyMG: Rifle_Long_Base_F {