mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Overheating - Add barrel mass config value (#8906)
This commit is contained in:
parent
e0a3bd65ab
commit
53c0348a15
@ -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];
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user