This reverts commit 4bbb3ac609, reversing
changes made to 96f1d40a71.
This commit is contained in:
seelenapparat
2021-08-24 15:32:43 +02:00
parent 4bbb3ac609
commit 109ec5c9a3
145 changed files with 629 additions and 9202 deletions

View File

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