Give vehUpgraded a default value #1745

@oiad No need to check _vehtrade in this case it will always be true if
_vehUpgraded != ""
This commit is contained in:
ebaydayz
2016-08-19 14:17:13 -04:00
parent 461424ff41
commit f3370cbc4b
2 changed files with 3 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ _mags = _this select 1;
_extraText = _this select 2;
_bags = _this select 3;
_vehTrade = false;
_vehUpgraded = "";
if (false call Z_checkCloseVehicle) then {
_vehUpgraded = getText (configFile >> 'CfgVehicles' >> typeOf (Z_vehicle) >> 'original');
@@ -55,7 +56,7 @@ _totalPrice = 0;
if (isNumber (missionConfigFile >> "CfgTraderCategory" >> _cat >> "duplicate")) then {
_cat = format["Category_%1",getNumber (missionConfigFile >> "CfgTraderCategory" >> _cat >> "duplicate")];
};
if (_vehUpgraded != "" && _vehTrade && _y == (typeOf Z_vehicle)) then { _y = _vehUpgraded; };
if (_vehUpgraded != "" && _y == (typeOf Z_vehicle)) then { _y = _vehUpgraded; };
_exists = isClass(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y);
if (_exists) exitWith {
_pic = "";