Arsenal - Fix weapon without mag showing weird velocity (#6500)

* Fix weapon without mag showing weird velocity

* Update stringtable.xml

* Change string to str_empty
This commit is contained in:
Josuan Albin 2018-08-06 05:22:39 +02:00 committed by PabstMirror
parent 240046ceee
commit bac4156d1a

View File

@ -25,10 +25,8 @@ if (EGVAR(arsenal,currentLeftPanel) == 2002) then {
[handgunWeapon EGVAR(arsenal,center), _primaryMag param [0, ""]]
} params ["_weapon", "_magazine"];
private _initSpeed = getNumber (_config >> "initSpeed");
if (_magazine isEqualTo "") then {
_initSpeed
localize "str_empty";
} else {
private _ammoCfg = (configFile >> "CfgAmmo" >> (getText (configFile >> "CfgMagazines" >> _magazine >> "ammo")));
private _barrelLength = getNumber (_config >> "ACE_barrelLength");
@ -40,6 +38,6 @@ if (_magazine isEqualTo "") then {
format ["%1 m/s (%2 ft/s)", _muzzleVelocity toFixed 0, (_muzzleVelocity * 3.28084) toFixed 0]
} else {
_initSpeed
localize "str_empty";
};
};