revert changes from other PR to make it compatible

This commit is contained in:
commy2 2016-05-16 15:22:37 +02:00
parent cac7b9c0c3
commit 473149b8ca
2 changed files with 6 additions and 4 deletions

View File

@ -29,9 +29,9 @@ GVAR(AssignedItemsShownItems) = [
];
["playerInventoryChanged", {
params ["_unit", "_assignedItems"];
params ["_unit"];
_assignedItems = _assignedItems param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
GVAR(AssignedItemsShownItems) = [
!((_assignedItems select 0) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 0 >> "ACE_hideItemType") != "map"},

View File

@ -45,10 +45,12 @@ GVAR(surfaceCacheIsDust) = false;
GVAR(OldGlasses) = "<null>";
["playerInventoryChanged", {
private _currentGlasses = (_this select 1) param [7, ""];
params ["_unit"];
private _currentGlasses = goggles _unit;
if (GVAR(OldGlasses) != _currentGlasses) then {
["GlassesChanged", [ACE_player, _currentGlasses]] call EFUNC(common,localEvent);
["GlassesChanged", [_unit, _currentGlasses]] call EFUNC(common,localEvent);
GVAR(OldGlasses) = _currentGlasses;
};
}] call EFUNC(common,addEventHandler);