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>
|
|
|
|
*
|
|
|
|
* ReturnValue:
|
|
|
|
* Should the unit stay unconscious? <BOOL>
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
private ["_unit","_return"];
|
|
|
|
_unit = _this select 0;
|
|
|
|
|
2015-03-06 21:54:44 +00:00
|
|
|
if (GVAR(level) == 1) exitwith {true};
|
2015-02-08 12:06:44 +00:00
|
|
|
if (isnil QGVAR(unconsciousConditions)) then {
|
|
|
|
GVAR(unconsciousConditions) = [];
|
|
|
|
};
|
|
|
|
|
|
|
|
_return = false;
|
|
|
|
{
|
|
|
|
if (typeName _x == typeName {} && {([_unit] call _x)}) exitwith {
|
|
|
|
_return = true;
|
|
|
|
};
|
|
|
|
}foreach GVAR(unconsciousConditions);
|
|
|
|
|
|
|
|
_return;
|