Skip to content

Commit

Permalink
Common - Update header for addPlayerEH (acemod#10086)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored Jun 23, 2024
1 parent bdb6c7c commit 5c8ea65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions addons/common/functions/fnc_addPlayerEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@
/*
* Author: PabstMirror
* Adds event handler just to ACE_player
* Can be removed after cba 3.18 is released for CBA_fnc_addBISPlayerEventHandler
* This never was public in a release
*
* Arguments:
* 0: Key <STRING>
* 1: Event Type <STRING>
* 2: Event Code <CODE>
* 3: Ignore Virtual Units (spectators, virtual zeus, uav RC) <BOOL> (default: false)
* 3: Ignore Virtual Units (spectators, virtual zeus, uav RC) <BOOL> (default: true)
*
* Return Value:
* None
*
* Example:
* ["example", "FiredNear", {systemChat str _this}] call ace_common_fnc_addPlayerEH
*
* Public: Yes
* Public: No
*/
params [["_key", "", [""]], ["_type", "", [""]], ["_code", {}, [{}]], ["_ignoreVirtual", false, [false]]];
params [["_key", "", [""]], ["_type", "", [""]], ["_code", {}, [{}]], ["_ignoreVirtual", true, [true]]];
TRACE_3("addPlayerEH",_key,_type,_ignoreVirtual);

if (isNil QGVAR(playerEventsHash)) then { // first-run init
Expand Down
2 changes: 1 addition & 1 deletion addons/ui/XEH_clientInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ GVAR(elementsSet) = createHashMap;
}] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler;

[QUOTE(ADDON), "AnimChanged", LINKFUNC(onAnimChanged)] call EFUNC(common,addPlayerEH);
[QUOTE(ADDON), "AnimChanged", LINKFUNC(onAnimChanged), true] call EFUNC(common,addPlayerEH);

0 comments on commit 5c8ea65

Please sign in to comment.