2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-01-14 01:57:15 +00:00
|
|
|
Name: ACE_SwitchUnits_fnc_isValidAi
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
Author(s):
|
|
|
|
bux578
|
|
|
|
|
|
|
|
Description:
|
|
|
|
Checks if AI is a valid target for switching
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
0: OBJECT - unit
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
VOID
|
|
|
|
*/
|
|
|
|
|
2015-01-12 14:47:22 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
private ["_unit"];
|
|
|
|
|
|
|
|
_unit = _this select 0;
|
|
|
|
|
2015-01-13 05:14:27 +00:00
|
|
|
!([_unit] call EFUNC(common,isPlayer)
|
2015-01-11 16:42:31 +00:00
|
|
|
|| {_unit in playableUnits}
|
|
|
|
|| {vehicle _unit != _unit}
|
2015-01-12 14:47:22 +00:00
|
|
|
|| {_unit getVariable [QGVAR(IsPlayerUnit), false]}
|
|
|
|
|| {_unit getVariable [QGVAR(IsPlayerControlled), false]})
|