2015-03-08 16:50:06 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Called when a unit switched locality
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
|
|
|
* 1: Is local <BOOL>
|
|
|
|
*
|
|
|
|
* ReturnValue:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
params ["_unit", "_local"];
|
2015-03-08 16:50:06 +00:00
|
|
|
if (_local) then {
|
|
|
|
if (_unit getvariable[QGVAR(addedToUnitLoop),false]) then {
|
|
|
|
[_unit, true] call FUNC(addToInjuredCollection);
|
|
|
|
};
|
2015-04-17 19:27:57 +00:00
|
|
|
|
2015-05-02 03:42:43 +00:00
|
|
|
if ((_unit getvariable ["ACE_isUnconscious",false]) && {count (_unit getvariable [QGVAR(unconsciousArguments), []]) >= 6}) then {
|
2015-04-20 20:08:31 +00:00
|
|
|
private "_arguments";
|
|
|
|
_arguments = (_unit getvariable [QGVAR(unconsciousArguments), []]);
|
2015-05-21 16:42:44 +00:00
|
|
|
_arguments set [2, ACE_time];
|
2015-04-17 19:27:57 +00:00
|
|
|
|
2015-04-20 20:08:31 +00:00
|
|
|
[DFUNC(unconsciousPFH), 0.1, _arguments ] call CBA_fnc_addPerFrameHandler;
|
2015-04-17 19:27:57 +00:00
|
|
|
|
2015-04-20 20:08:31 +00:00
|
|
|
_unit setvariable [QGVAR(unconsciousArguments), nil, true];
|
2015-04-17 19:27:57 +00:00
|
|
|
};
|
2015-03-08 16:50:06 +00:00
|
|
|
};
|