mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Fix possible undefined variables when a zed getting deleted
This commit is contained in:
@@ -10,6 +10,7 @@ local _speedMax = DZE_ZombieSpeed select 1;
|
||||
local _cantSee = false;
|
||||
|
||||
{
|
||||
if (!isNull _x) then {
|
||||
local _isZombie = _x isKindOf "zZombie_base";
|
||||
local _isMutant = (DZE_Bloodsuckers && {typeOf _x == "z_bloodsucker"});
|
||||
local _forcedSpeed = if ((_speedMin != _speedMax) && {(_speedMin > 0) && (_speedMax > 0)}) then {((random (DZE_ZombieSpeed select 1)) max (DZE_ZombieSpeed select 0));} else {getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "forcedSpeed");};
|
||||
@@ -125,6 +126,7 @@ local _cantSee = false;
|
||||
};
|
||||
|
||||
if (_isMutant && {DZE_BloodsuckerDeleteNearTrader && isInTraderCity}) then {deleteVehicle _x}; // Delete bloodsucker if the player is in a trader city
|
||||
};
|
||||
} forEach ((getPosATL _refObj) nearEntities ["Zed_Base",100]);
|
||||
|
||||
if (_attacked) then {
|
||||
|
||||
Reference in New Issue
Block a user