Prevent zeds from attacking if speed is > 10 and prevent targeting if
speed over 25.
This commit is contained in:
vbawol
2013-07-13 11:27:41 -05:00
parent 5cd5bacb31
commit 16d27e5408
2 changed files with 13 additions and 10 deletions

View File

@@ -17,19 +17,19 @@ _targets = _lead nearTargets _range;
private["_obj","_dis"];
_obj = _x select 4;
_dis = _obj distance _lead;
// if (_obj isKindOf "Man") then {
if (((_obj isKindOf "Man") or (_obj isKindOf "AllVehicles")) and !(_obj isKindOf "zZombie_Base") and !(_obj in _targetMen)) then {
if (_obj isKindOf "Man") then {
if (!(_obj isKindOf "zZombie_Base") and !(_obj in _targetMen)) then {
//process man targets
_targetMen set [count _targetMen,_obj];
_targetDis set [count _targetDis,_dis];
};
// } else {
// if ((_obj isKindOf "AllVehicles") and (count crew _obj > 0) and !(_obj in _targetMen)) then {
// //process vehicle targets
// _targetMen set [count _targetMen,_obj];
// _targetDis set [count _targetDis,_dis];
// };
// };
} else {
if ((speed _obj < 25) and (_obj isKindOf "AllVehicles") and ((count crew _obj) > 0) and !(_obj in _targetMen)) then {
//process vehicle targets
_targetMen set [count _targetMen,_obj];
_targetDis set [count _targetDis,_dis];
};
};
} forEach _targets;
//Search for fires