Revert "Revert "Merge branch 'master' of https://github.com/EpochModTeam/DayZ-Epoch""

This reverts commit 109ec5c9a3.
This commit is contained in:
seelenapparat
2021-08-24 15:47:06 +02:00
parent c801365a1f
commit d1abb66e9f
145 changed files with 9200 additions and 627 deletions

View File

@@ -1,23 +1,16 @@
private ["_unit","_distance","_doRun","_pos","_listTalk","_zombie","_50","_localtargets","_remotetargets","_targets","_dis"];
_unit = _this select 0;
_distance = _this select 1;
_doRun = _this select 2;
_pos = _this select 3;
_listTalk = _pos nearEntities ["zZombie_Base",_distance];
local _unit = _this select 0;
local _distance = _this select 1;
local _doRun = _this select 2;
local _pos = _this select 3;
{
_distance = _distance max floor(_distance*.9);
_dis = _x distance _unit;
_zombie = _x;
local _dis = _x distance _unit;
call {
if (_dis < 51) exitwith {
if (_doRun) then {
_localtargets = _x getVariable ["localtargets",[]];
_remotetargets = _x getVariable ["remotetargets",[]];
_targets = _localtargets + _remotetargets;
local _localtargets = _x getVariable ["localtargets",[]];
local _remotetargets = _x getVariable ["remotetargets",[]];
local _targets = _localtargets + _remotetargets;
if (!(_unit in _targets)) then {
if !(local _x) then {
_remotetargets set [count _remotetargets,_unit];
@@ -28,16 +21,15 @@ _listTalk = _pos nearEntities ["zZombie_Base",_distance];
};
};
} else {
_zombie setVariable ["myDest",_pos,true];
_x setVariable ["myDest",_pos,true];
};
};
if ((_dis > 50) && {_dis <= 71}) exitwith {
_50 = round(random 100);
if (_50 < 50) then {
if (random 100 < 50) then {
if (_doRun) then {
_localtargets = _x getVariable ["localtargets",[]];
_remotetargets = _x getVariable ["remotetargets",[]];
_targets = _localtargets + _remotetargets;
local _localtargets = _x getVariable ["localtargets",[]];
local _remotetargets = _x getVariable ["remotetargets",[]];
local _targets = _localtargets + _remotetargets;
if (!(_unit in _targets)) then {
if !(local _x) then {
_remotetargets set [count _remotetargets,_unit];
@@ -48,14 +40,14 @@ _listTalk = _pos nearEntities ["zZombie_Base",_distance];
};
};
} else {
_zombie setVariable ["myDest",_pos,true];
_x setVariable ["myDest",_pos,true];
};
} else {
_zombie setVariable ["myDest",_pos,true];
_x setVariable ["myDest",_pos,true];
};
};
if (_dis > 70) exitwith {
_zombie setVariable ["myDest",_pos,true];
_x setVariable ["myDest",_pos,true];
};
};
} count _listTalk;
} count (_pos nearEntities ["Zed_Base",_distance]);