2015-01-18 21:16:35 +00:00
|
|
|
/**
|
|
|
|
* fnc_addToInjuredCollection.sqf
|
|
|
|
* @Descr: N/A
|
|
|
|
* @Author: Glowbal
|
|
|
|
*
|
|
|
|
* @Arguments: []
|
|
|
|
* @Return:
|
|
|
|
* @PublicAPI: false
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
private "_unit";
|
|
|
|
_unit = _this select 0;
|
|
|
|
if !(local _unit) exitwith{
|
|
|
|
[[_unit], QUOTE(FUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc);
|
|
|
|
};
|
|
|
|
|
|
|
|
if !(_unit getvariable[QGVAR(addedToUnitLoop),false]) then{
|
2015-01-20 10:36:52 +00:00
|
|
|
_unit setvariable [QGVAR(addedToUnitLoop),true, true];
|
2015-01-18 21:16:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
if ([_unit] call FUNC(hasMedicalEnabled)) then {
|
|
|
|
if (isnil QGVAR(injuredUnitCollection)) then {
|
|
|
|
GVAR(injuredUnitCollection) = [];
|
|
|
|
};
|
|
|
|
if (_unit in GVAR(injuredUnitCollection)) exitwith {};
|
|
|
|
GVAR(injuredUnitCollection) pushback _unit;
|
2015-01-20 10:36:52 +00:00
|
|
|
};
|