ACE3/addons/medical/functions/fnc_getUnconsciousCondition.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

29 lines
637 B
Plaintext

/**
* fn_getUnconsciousCondition.sqf
* @Descr: get whatever or not a unit should be or stay unconscious
* @Author: Glowbal
*
* @Arguments: [unit OBJECT]
* @Return: BOOL True when the unit should be unconscious
* @PublicAPI: true
*/
#include "script_component.hpp"
private ["_unit","_return"];
_unit = _this select 0;
if (isnil QGVAR(unconsciousConditions)) then {
GVAR(unconsciousConditions) = [];
};
_return = false;
{
if (typeName _x == typeName {}) then {
if (([_unit] call _x)) then {
_return = true;
};
};
if (_return) exitwith{};
}foreach GVAR(unconsciousConditions);
_return