2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-06-08 10:09:49 +00:00
|
|
|
* Author: bux578, commy2, akalegman
|
2015-01-11 16:42:31 +00:00
|
|
|
* Checks if a unit is a player / curator controlled unit.
|
2015-12-18 17:08:10 +00:00
|
|
|
* This now includes both local and non-local remote controlled zeus units. (Remotes from another zeus machine)
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-09-18 19:12:40 +00:00
|
|
|
* 0: unit to be checked <OBJECT>
|
|
|
|
* 1: exclude remote controlled units <BOOL>
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-09-18 19:12:40 +00:00
|
|
|
* Is unit a player? <BOOL>
|
|
|
|
*
|
2015-12-18 17:08:10 +00:00
|
|
|
* Example:
|
|
|
|
* [cursorTarget, false] call ace_common_fnc_isPlayer;
|
|
|
|
*
|
2015-09-18 19:12:40 +00:00
|
|
|
* Public: Yes
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-09-18 19:12:40 +00:00
|
|
|
params ["_unit", ["_excludeRemoteControlled", false]];
|
2015-06-08 10:09:49 +00:00
|
|
|
|
2015-12-18 17:08:10 +00:00
|
|
|
(isPlayer _unit) || {(!_excludeRemoteControlled) && {!isNull (_unit getVariable ["bis_fnc_moduleRemoteControl_owner", objNull])}}
|