mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Prevent errors if zombie is deleted suddenly
This commit is contained in:
@@ -20,6 +20,7 @@ _playerDodged = false;
|
|||||||
|
|
||||||
if (_type != "zombie") exitWith { diag_log ("not a zombie"); }; // we deal only with zombies in this function
|
if (_type != "zombie") exitWith { diag_log ("not a zombie"); }; // we deal only with zombies in this function
|
||||||
if (_unit distance _vehicle > 3) exitWith {}; // distance too far according to any logic dealt here //+str(_unit distance _nextPlayerPos)+"/"+str(_areaAffect)
|
if (_unit distance _vehicle > 3) exitWith {}; // distance too far according to any logic dealt here //+str(_unit distance _nextPlayerPos)+"/"+str(_areaAffect)
|
||||||
|
if (isNull _unit) exitWith {}; // Prevent errors if zombie is deleted suddenly
|
||||||
|
|
||||||
// compute the animation move
|
// compute the animation move
|
||||||
_rnd = 0;
|
_rnd = 0;
|
||||||
@@ -85,7 +86,7 @@ if (local _unit) then {
|
|||||||
*/
|
*/
|
||||||
[objNull, _unit, rplaymove, _move] call RE;
|
[objNull, _unit, rplaymove, _move] call RE;
|
||||||
uiSleep 0.5;
|
uiSleep 0.5;
|
||||||
|
if (isNull _unit) exitWith {}; // Prevent errors if zombie is deleted suddenly
|
||||||
//slow it down make sure the animation isnt running after the damage
|
//slow it down make sure the animation isnt running after the damage
|
||||||
//_timeout = diag_tickTime + 0.3;
|
//_timeout = diag_tickTime + 0.3;
|
||||||
//waitUntil { diag_tickTime >= _timeout; };
|
//waitUntil { diag_tickTime >= _timeout; };
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
private ["_target","_targets","_man","_manDis","_localtargets","_remotetargets"];
|
private ["_target","_targets","_man","_manDis","_localtargets","_remotetargets"];
|
||||||
_agent = _this;
|
_agent = _this;
|
||||||
|
if (isNull _agent) exitWith {objNull}; // Prevent errors if zombie is suddenly deleted
|
||||||
_target = objNull;
|
_target = objNull;
|
||||||
_targets = [];
|
_targets = [];
|
||||||
//_targetDis = [];
|
//_targetDis = [];
|
||||||
|
|||||||
@@ -760,6 +760,7 @@ class FSM
|
|||||||
"_remotetargets = _agent getVariable [""remotetargets"",[]];" \n
|
"_remotetargets = _agent getVariable [""remotetargets"",[]];" \n
|
||||||
"" \n
|
"" \n
|
||||||
"//Clear remote on reset" \n
|
"//Clear remote on reset" \n
|
||||||
|
"if (isNull _agent) then {_remotetargets = [];};" \n
|
||||||
"if (count _remotetargets > 0) then {" \n
|
"if (count _remotetargets > 0) then {" \n
|
||||||
" _agent setVariable [""remotetargets"",[],true];" \n
|
" _agent setVariable [""remotetargets"",[],true];" \n
|
||||||
"};" \n
|
"};" \n
|
||||||
|
|||||||
Reference in New Issue
Block a user