mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical - add eh for setUnconscious helper func (#6937)
This commit is contained in:
parent
17f4af37fa
commit
56811403f2
@ -1,6 +1,8 @@
|
||||
// #define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
[QEGVAR(medical,setUnconscious), LINKFUNC(setUnconscious)] call CBA_fnc_addEventHandler;
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
[missionNamespace, "ACE_setCustomAimCoef", QUOTE(ADDON), {
|
||||
|
@ -25,7 +25,7 @@ if !(EGVAR(common,settingsInitFinished)) exitWith {
|
||||
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setUnconscious), _this];
|
||||
};
|
||||
|
||||
params ["_unit", ["_knockOut", true, [false]], ["_minWaitingTime", 0, [0]], ["_forcedWakup", false, [false]]];
|
||||
params [["_unit", objNull, [objNull]], ["_knockOut", true, [false]], ["_minWaitingTime", 0, [0]], ["_forcedWakup", false, [false]]];
|
||||
TRACE_4("setUnconscious",_unit,_knockOut,_minWaitingTime,_forcedWakup);
|
||||
|
||||
if ((isNull _unit) || {!alive _unit} || {!(_unit isKindOf "CAManBase")}) exitWith {
|
||||
@ -34,7 +34,7 @@ if ((isNull _unit) || {!alive _unit} || {!(_unit isKindOf "CAManBase")}) exitWit
|
||||
};
|
||||
|
||||
if (!local _unit) exitWith {
|
||||
[QEGVAR(medical,setUnconscious), [_unit, _knockOut], _unit] call CBA_fnc_targetEvent;
|
||||
[QEGVAR(medical,setUnconscious), _this, _unit] call CBA_fnc_targetEvent;
|
||||
true
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user