mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix to weaponMuzzleVelocity (#6850)
* Fix incorrect muzzle velocity displayed on magazine * Apply suggestions from code review Co-Authored-By: dedmen <dedmen@users.noreply.github.com> * Remove garbage file * Script header updates * Update addons/ballistics/functions/fnc_statTextStatement_magazineMuzzleVelocity.sqf Co-Authored-By: dedmen <dedmen@users.noreply.github.com> * Add Pabst' fix to weaponMuzzleVelocity
This commit is contained in:
parent
5ad8b3c6bc
commit
28620d86d1
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user