ACE3/addons/common/functions/fnc_disableAI.sqf
Glowbal 13c2127574 Clean up of old CSE code
Removed all _F suffixes
Reorganized the RPEP list.
Removed unnecessary functions.
2015-02-14 20:29:07 +01:00

23 lines
517 B
Plaintext

/**
* fn_disableAI_f.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
private ["_unit","_disable"];
_unit = [_this, 0,ObjNull,[ObjNull]] call BIS_fnc_Param;
_disable = [_this, 1,false,[false]] call BIS_fnc_Param;
if (local _unit && !(IsPlayer _unit)) then {
if (_disable) then {
_unit disableAI "Move";
_unit disableAI "TARGET";
} else {
_unit enableAI "Move";
_unit enableAI "TARGET";
};
};