Add _allowedDistance check for tanks too

This commit is contained in:
A Man
2020-01-25 12:19:14 +01:00
parent 8de9858b64
commit 9cc8b5d83d

View File

@@ -217,8 +217,8 @@ if (_isPZombie) then {
};
};
// Increase distance only if AIR or SHIP
_allowedDistance = [4, 8] select ((_cursorTarget isKindOf "Air") || (_cursorTarget isKindOf "Ship"));
// Increase distance only if AIR, SHIP or TANK
_allowedDistance = [4, 8] select ((_cursorTarget isKindOf "Air") || {_cursorTarget isKindOf "Ship"} || {_cursorTarget isKindOf "Tank"});
if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance _cursorTarget < _allowedDistance} && {_canDo}) then {
//Has some kind of target