Skip to content

Commit

Permalink
Add Pabst' fix to weaponMuzzleVelocity
Browse files Browse the repository at this point in the history
  • Loading branch information
dedmen committed Mar 6, 2019
1 parent 7d8d7d4 commit beb800e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ if (_magazine isEqualTo "") then {
private _barrelLengthTable = getArray (_ammoCfg >> "ACE_barrelLengths");

if (_barrelLength != 0 && {count _muzzleVelocityTable > 0} && {count _barrelLengthTable > 0}) then {
private _muzzleVelocity = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, 0] call EFUNC(advanced_ballistics,calculateBarrelLengthVelocityShift);
private _muzzleVelocity = if (["ace_advanced_ballistics"] call EFUNC(common,isModLoaded)) then {
[_barrelLength, _muzzleVelocityTable, _barrelLengthTable, 0] call EFUNC(advanced_ballistics,calculateBarrelLengthVelocityShift);
} else {
getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed")
};

format ["%1 m/s (%2 ft/s)", _muzzleVelocity toFixed 0, (_muzzleVelocity * 3.28084) toFixed 0]
} else {
Expand Down

0 comments on commit beb800e

Please sign in to comment.