mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Pass by reference for BI EHs (#6368)
This commit is contained in:
parent
f3f57c6a38
commit
232f986048
@ -29,7 +29,7 @@ if (_local) then {
|
||||
if (_unit getVariable [QGVAR(handcuffAnimEHID), -1] != -1) exitWith {};
|
||||
|
||||
// Otherwise, restart the AnimChanged EH in the new machine
|
||||
private _animChangedEHID = _unit addEventHandler ["AnimChanged", DFUNC(handleAnimChangedHandcuffed)];
|
||||
private _animChangedEHID = _unit addEventHandler ["AnimChanged", {call FUNC(handleAnimChangedHandcuffed)}];
|
||||
TRACE_2("Adding animChangedEH",_unit,_animChangedEHID);
|
||||
_unit setVariable [QGVAR(handcuffAnimEHID), _animChangedEHID];
|
||||
};
|
||||
@ -40,7 +40,7 @@ if (_local) then {
|
||||
if (_unit getVariable [QGVAR(surrenderAnimEHID), -1] != -1) exitWith {};
|
||||
|
||||
// Otherwise, restart the AnimChanged EH in the new machine
|
||||
private _animChangedEHID = _unit addEventHandler ["AnimChanged", DFUNC(handleAnimChangedSurrendered)];
|
||||
private _animChangedEHID = _unit addEventHandler ["AnimChanged", {call FUNC(handleAnimChangedSurrendered)}];
|
||||
TRACE_2("Adding animChangedEH",_unit,_animChangedEHID);
|
||||
_unit setVariable [QGVAR(surrenderAnimEHID), _animChangedEHID];
|
||||
};
|
||||
|
@ -73,7 +73,7 @@ if (_state) then {
|
||||
TRACE_1("removing animChanged EH",_animChangedEHID);
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
};
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", DFUNC(handleAnimChangedHandcuffed)];
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", {call FUNC(handleAnimChangedHandcuffed)}];
|
||||
TRACE_2("Adding animChangedEH",_unit,_animChangedEHID);
|
||||
_unit setVariable [QGVAR(handcuffAnimEHID), _animChangedEHID];
|
||||
|
||||
|
@ -64,7 +64,7 @@ if (_state) then {
|
||||
TRACE_1("removing animChanged EH",_animChangedEHID);
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
};
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", DFUNC(handleAnimChangedSurrendered)];
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", {call FUNC(handleAnimChangedSurrendered)}];
|
||||
_unit setVariable [QGVAR(surrenderAnimEHID), _animChangedEHID];
|
||||
};
|
||||
}, [_unit], 0.01] call CBA_fnc_waitAndExecute;
|
||||
|
@ -50,7 +50,7 @@
|
||||
GVAR(currentAircraftNamespace) = true call CBA_fnc_createNamespace;
|
||||
publicVariable QGVAR(currentAircraftNamespace);
|
||||
|
||||
addMissionEventHandler ["HandleDisconnect", LINKFUNC(handleDisconnect)];
|
||||
addMissionEventHandler ["HandleDisconnect", {call FUNC(handleDisconnect)}];
|
||||
};
|
||||
|
||||
GVAR(searchDistanceSqr) = GVAR(searchDistance) ^ 2;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (isServer) then {
|
||||
addMissionEventHandler ["HandleDisconnect", LINKFUNC(handleDisconnect)];
|
||||
addMissionEventHandler ["HandleDisconnect", {call FUNC(handleDisconnect)}];
|
||||
};
|
||||
|
||||
[QGVAR(initSource), LINKFUNC(initSource)] call CBA_fnc_addEventHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user