ACE3/addons/captives/functions/fnc_handleKilled.sqf

31 lines
656 B
Plaintext
Raw Normal View History

2015-02-04 06:35:51 +00:00
/*
* Author: PabstMirror
2015-02-06 09:38:27 +00:00
* Handles when a unit is kill. Reset captivity and escorting status
2015-02-04 06:35:51 +00:00
*
* Arguments:
* 0: _oldUnit <OBJECT>
*
* Return Value:
* None
*
* Example:
2015-02-06 23:03:56 +00:00
* [bob1] call ACE_captives_fnc_handleKilled
2015-02-04 06:35:51 +00:00
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_1(_oldUnit);
2015-02-05 22:39:45 +00:00
if (_oldUnit getVariable [QGVAR(isHandcuffed), false]) then {
2015-03-26 05:53:38 +00:00
[_oldUnit, false] call FUNC(setSurrendered);
2015-02-04 06:35:51 +00:00
};
2015-02-04 19:16:19 +00:00
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
2015-02-06 09:38:27 +00:00
_oldUnit setVariable [QGVAR(isEscorting), false, true];
2015-02-04 06:35:51 +00:00
};
2015-02-06 23:03:56 +00:00
if (_oldUnit getVariable [QGVAR(isSurrendering), false]) then {
2015-03-26 05:53:38 +00:00
[_oldUnit, false] call FUNC(setSurrendered);
2015-02-06 23:03:56 +00:00
};