Fix terminals not being properly added to currentItems (#6504)

This commit is contained in:
Josuan Albin 2018-08-06 06:15:49 +02:00 committed by PabstMirror
parent bac4156d1a
commit 29d11bc752
2 changed files with 19 additions and 5 deletions

View File

@ -76,10 +76,17 @@ for "_index" from 0 to 15 do {
};
{
private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation");
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType));
if (_simulationType != "NVGoggles") then {
if (_simulationType == "ItemGps" || _simulationType == "Weapon") then {
GVAR(currentItems) set [14, _x];
} else {
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch"] find (tolower _simulationType));
GVAR(currentItems) set [_index, _x];
} foreach (assignedItems GVAR(center));
};
};
} forEach (assignedItems GVAR(center));
call FUNC(updateUniqueItemsList);

View File

@ -165,9 +165,16 @@ for "_index" from 0 to 15 do {
{
private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation");
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType));
if (_simulationType != "NVGoggles") then {
if (_simulationType == "ItemGps" || _simulationType == "Weapon") then {
GVAR(currentItems) set [14, _x];
} else {
private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch"] find (tolower _simulationType));
GVAR(currentItems) set [_index, _x];
};
};
} forEach (assignedItems GVAR(center));
GVAR(currentWeaponType) = switch true do {