ACE3/addons/medical/functions/fnc_getUnconsciousCondition.sqf

29 lines
643 B
Plaintext
Raw Normal View History

2015-01-16 23:21:47 +00:00
/**
* 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_F)) then {
2015-01-18 19:09:19 +00:00
GVAR(unconsciousConditions_F) = [];
2015-01-16 23:21:47 +00:00
};
_return = false;
{
2015-01-18 19:09:19 +00:00
if (typeName _x == typeName {}) then {
if (([_unit] call _x)) then {
_return = true;
};
};
if (_return) exitwith{};
2015-01-16 23:21:47 +00:00
}foreach GVAR(unconsciousConditions_F);
_return