mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
@@ -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
|
||||
|
||||
14
SQF/dayz_code/compile/fn_isEqual.sqf
Normal file
14
SQF/dayz_code/compile/fn_isEqual.sqf
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
Kilzone_Kid's megafast isEqual function
|
||||
params [array1,array2]
|
||||
|
||||
Examples:
|
||||
hint str ([[1,2,3], [1,2,3]] call fnc_isEqual); //true
|
||||
hint str ([[1,[2,[3]]], [1,[2,[3]]]] call fnc_isEqual); //true
|
||||
hint str ([[1,[2,[3]]], [1,[2,[4]]]] call fnc_isEqual); //false
|
||||
*/
|
||||
|
||||
switch (_this select 0) do {
|
||||
case (_this select 1) : {true};
|
||||
default {false};
|
||||
};
|
||||
@@ -595,6 +595,7 @@ fnc_veh_handleRepair = compile preprocessFileLineNumbers "\z\addons\dayz_code\co
|
||||
fnc_veh_ResetEH = compile preprocessFileLineNumbers "\z\addons\dayz_code\init\veh_ResetEH.sqf"; //Initialize vehicle
|
||||
fnc_veh_setFixServer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\veh_setFixServer.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
|
||||
fnc_inString = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_inString.sqf";
|
||||
fnc_isEqual = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_isEqual.sqf";
|
||||
fnc_isInsideBuilding = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_isInsideBuilding.sqf"; //_isInside = [_unit,_building] call fnc_isInsideBuilding;
|
||||
dayz_zombieSpeak = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_speak.sqf"; //Used to generate random speech for a unit
|
||||
vehicle_getHitpoints = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getHitpoints.sqf";
|
||||
|
||||
@@ -334,7 +334,7 @@ createCenter civilian;
|
||||
actualSpawnMarkerCount = 0;
|
||||
// count valid spawn markers, since different maps have different amounts
|
||||
for "_i" from 0 to 10 do {
|
||||
if !([(getMarkerPos format["spawn%1",_i]), [0,0,0]] call BIS_fnc_areEqual) then {
|
||||
if !([(getMarkerPos format["spawn%1",_i]), [0,0,0]] call fnc_isEqual) then {
|
||||
actualSpawnMarkerCount = actualSpawnMarkerCount + 1;
|
||||
} else {
|
||||
_i = 11; // exit since we did not find any further markers
|
||||
|
||||
Reference in New Issue
Block a user