implement pr #5385

This commit is contained in:
commy2 2018-01-02 16:34:13 +01:00
parent 1f2b187ee3
commit 6520fdb624
2 changed files with 8 additions and 2 deletions

View File

@ -17,7 +17,10 @@
params ["_unit"];
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
_unit setVariable [
QGVAR(HandleDamageEHID),
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]
];
if (local _unit) then {
if (!EGVAR(common,settingsInitFinished)) exitWith {

View File

@ -13,7 +13,10 @@
} else {
// Calling this function inside curly brackets allows the usage of
// "exitWith", which would be broken with "HandleDamage" otherwise.
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
_unit setVariable [
QGVAR(HandleDamageEHID),
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]
];
};
}, nil, nil, true] call CBA_fnc_addClassEventHandler;