2015-03-10 16:08:15 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2, PabstMirror
|
2016-06-04 10:12:56 +00:00
|
|
|
* Handles the "ace_unconscious" event
|
2015-03-10 16:08:15 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 0: Is Unconsisisiouses <BOOL>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Nothing
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [bob, true] call ACE_captives_fnc_handleOnUnconscious
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-04 23:15:20 +00:00
|
|
|
params ["_unit","_isUnconc"];
|
2015-03-10 16:08:15 +00:00
|
|
|
|
|
|
|
if (!local _unit) exitWith {};
|
|
|
|
|
|
|
|
if (_isUnconc) then {
|
|
|
|
//Knocked out: If surrendering, stop
|
2015-04-03 06:45:02 +00:00
|
|
|
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
2015-03-10 16:08:15 +00:00
|
|
|
[_unit, false] call FUNC(setSurrendered);
|
|
|
|
};
|
|
|
|
} else {
|
|
|
|
//Woke up: if handcuffed, goto animation
|
|
|
|
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
|
|
|
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
|
|
|
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
|
|
|
};
|
|
|
|
};
|