Add faster array compare function

Vanilla commit:

https://github.com/DayZMod/DayZ/commit/7bbeab4e7db4d340cdd34b6c288bafc0833b1a8e
This commit is contained in:
ebaydayz
2016-08-23 11:17:07 -04:00
parent 8c43b0fc1a
commit d7cc4be585
4 changed files with 17 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ _plant = _this;
if (_plant getVariable["Gathering",false]) exitWith {};
_originalCount = getNumber (configFile >> "CfgVehicles" >> (typeOf _plant) >> "TransportMagazines" >> "_xx_leaf" >> "count");
if !([ [[["equip_comfreyleafs"],[_originalCount]],[[],[]]] , [getMagazineCargo _plant, getWeaponCargo _plant] ] call BIS_fnc_areEqual) then {
if !([ [[["equip_comfreyleafs"],[_originalCount]],[[],[]]] , [getMagazineCargo _plant, getWeaponCargo _plant] ] call fnc_isEqual) then {
//diag_log [ [getMagazineCargo _plant, getWeaponCargo _plant], "!=", [[["equip_comfreyleafs"],[_originalCount]],[[],[]]] ];
_plant setVariable["Gathering",true]; // avoid multiple call because the fn_selfActions is called in an infinite loop
[_this] spawn { // in background to be called after fn_selfActions