2015-02-08 12:06:44 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Get whatever or not a unit should be or stay unconscious.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Return Value:
|
2015-02-08 12:06:44 +00:00
|
|
|
* Should the unit stay unconscious? <BOOL>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [bob] call ace_medical_fnc_getUnconsciousCondition
|
|
|
|
*
|
2015-02-08 12:06:44 +00:00
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
params ["_unit"];
|
2015-02-08 12:06:44 +00:00
|
|
|
|
|
|
|
if (isnil QGVAR(unconsciousConditions)) then {
|
|
|
|
GVAR(unconsciousConditions) = [];
|
|
|
|
};
|
|
|
|
|
2016-06-13 08:55:19 +00:00
|
|
|
private _return = false;
|
2015-02-08 12:06:44 +00:00
|
|
|
{
|
2015-11-20 17:40:31 +00:00
|
|
|
if ((_x isEqualType {}) && {([_unit] call _x)}) exitwith {
|
2015-02-08 12:06:44 +00:00
|
|
|
_return = true;
|
|
|
|
};
|
2015-08-22 14:25:10 +00:00
|
|
|
} foreach GVAR(unconsciousConditions);
|
2015-02-08 12:06:44 +00:00
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
_return
|