Skip to content

Commit

Permalink
General - Change FUNC to LINKFUNC where appropriate (#9882)
Browse files Browse the repository at this point in the history
FUNC -> LINKFUNC
  • Loading branch information
johnb432 authored Mar 28, 2024
1 parent 2a52ad1 commit 415d2f6
Show file tree
Hide file tree
Showing 77 changed files with 154 additions and 156 deletions.
6 changes: 3 additions & 3 deletions addons/advanced_ballistics/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ if (!hasInterface) exitWith {};
[] call FUNC(initializeTerrainExtension);

// Register fire event handler
["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
["ace_firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
["ace_firedPlayer", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler;
["ace_firedPlayerNonLocal", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler;

// Register Perframe Handler
[FUNC(handleFirePFH), GVAR(simulationInterval)] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(handleFirePFH), GVAR(simulationInterval)] call CBA_fnc_addPerFrameHandler;

//Add warnings for missing compat PBOs (only if AB is on)
{
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_throwing/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Fired XEH
GVAR(ammoEventHandlers) = createHashMap;
[QGVAR(throwFiredXEH), FUNC(throwFiredXEH)] call CBA_fnc_addEventHandler;
[QGVAR(throwFiredXEH), LINKFUNC(throwFiredXEH)] call CBA_fnc_addEventHandler;

// Exit on HC
if (!hasInterface) exitWith {};
Expand Down
4 changes: 2 additions & 2 deletions addons/ai/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
} forEach _sections;
}] call CBA_fnc_addEventHandler;

[QGVAR(unGarrison), FUNC(unGarrison)] call CBA_fnc_addEventHandler;
[QGVAR(unGarrison), LINKFUNC(unGarrison)] call CBA_fnc_addEventHandler;

[QGVAR(doMove), {
params ["_unitsArray"];
Expand Down Expand Up @@ -73,6 +73,6 @@
if (isServer) then {
["CAManBase", "init", {
// wait for HMD to be assigned so `hmd _unit` works
[FUNC(assignNVG), _this, 1] call CBA_fnc_waitAndExecute;
[LINKFUNC(assignNVG), _this, 1] call CBA_fnc_waitAndExecute;
}] call CBA_fnc_addClassEventHandler;
};
2 changes: 1 addition & 1 deletion addons/atragmx/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ if (!hasInterface) exitWith {};
GVAR(active) = false;
GVAR(initialised) = false;

[QEGVAR(vector,rangefinderData), {_this call FUNC(sord)}] call CBA_fnc_addEventHandler;
[QEGVAR(vector,rangefinderData), LINKFUNC(sord)] call CBA_fnc_addEventHandler;
10 changes: 5 additions & 5 deletions addons/captives/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ if (isServer) then {
};

["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
[QGVAR(moveInCaptive), FUNC(vehicleCaptiveMoveIn)] call CBA_fnc_addEventHandler;
[QGVAR(moveOutCaptive), FUNC(vehicleCaptiveMoveOut)] call CBA_fnc_addEventHandler;
[QGVAR(moveInCaptive), LINKFUNC(vehicleCaptiveMoveIn)] call CBA_fnc_addEventHandler;
[QGVAR(moveOutCaptive), LINKFUNC(vehicleCaptiveMoveOut)] call CBA_fnc_addEventHandler;

[QGVAR(setHandcuffed), FUNC(setHandcuffed)] call CBA_fnc_addEventHandler;
[QGVAR(setSurrendered), FUNC(setSurrendered)] call CBA_fnc_addEventHandler;
[QGVAR(setHandcuffed), LINKFUNC(setHandcuffed)] call CBA_fnc_addEventHandler;
[QGVAR(setSurrendered), LINKFUNC(setSurrendered)] call CBA_fnc_addEventHandler;

//Medical Integration Events
["ace_unconscious", FUNC(handleOnUnconscious)] call CBA_fnc_addEventHandler;
["ace_unconscious", LINKFUNC(handleOnUnconscious)] call CBA_fnc_addEventHandler;

if (!hasInterface) exitWith {};

Expand Down
2 changes: 1 addition & 1 deletion addons/casings/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ if (!hasInterface || !GVAR(enabled)) exitWith {};

GVAR(cachedCasings) = createHashMap;
GVAR(casings) = [];
["CAManBase", "FiredMan", {call FUNC(createCasing)}] call CBA_fnc_addClassEventHandler;
["CAManBase", "FiredMan", LINKFUNC(createCasing)] call CBA_fnc_addClassEventHandler;
6 changes: 3 additions & 3 deletions addons/chemlights/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

if (!hasInterface) exitWith {};

["ace_firedPlayer", DFUNC(throwEH)] call CBA_fnc_addEventHandler;
// ["ace_firedPlayerNonLocal", DFUNC(throwEH)] call CBA_fnc_addEventHandler;
// ["ace_firedNonPlayer", DFUNC(throwEH)] call CBA_fnc_addEventHandler;
["ace_firedPlayer", LINKFUNC(throwEH)] call CBA_fnc_addEventHandler;
// ["ace_firedPlayerNonLocal", LINKFUNC(throwEH)] call CBA_fnc_addEventHandler;
// ["ace_firedNonPlayer", LINKFUNC(throwEH)] call CBA_fnc_addEventHandler;
28 changes: 14 additions & 14 deletions addons/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//////////////////////////////////////////////////

//Status Effect EHs:
[QGVAR(setStatusEffect), {_this call FUNC(statusEffect_set)}] call CBA_fnc_addEventHandler;
[QGVAR(setStatusEffect), LINKFUNC(statusEffect_set)] call CBA_fnc_addEventHandler;
["forceWalk", false, ["ace_advanced_fatigue", "ACE_SwitchUnits", "ACE_Attach", "ace_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_Trenches", "ace_medical_fracture"]] call FUNC(statusEffect_addType);
["blockSprint", false, ["ace_advanced_fatigue", "ace_dragging", "ace_medical_fracture"]] call FUNC(statusEffect_addType);
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered)]] call FUNC(statusEffect_addType);
Expand Down Expand Up @@ -157,9 +157,9 @@ if (isServer) then {
INFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation);
}] call CBA_fnc_addEventHandler;

[QGVAR(fixCollision), FUNC(fixCollision)] call CBA_fnc_addEventHandler;
[QGVAR(fixFloating), FUNC(fixFloating)] call CBA_fnc_addEventHandler;
[QGVAR(fixPosition), FUNC(fixPosition)] call CBA_fnc_addEventHandler;
[QGVAR(fixCollision), LINKFUNC(fixCollision)] call CBA_fnc_addEventHandler;
[QGVAR(fixFloating), LINKFUNC(fixFloating)] call CBA_fnc_addEventHandler;
[QGVAR(fixPosition), LINKFUNC(fixPosition)] call CBA_fnc_addEventHandler;

["ace_loadPersonEvent", LINKFUNC(loadPersonLocal)] call CBA_fnc_addEventHandler;
["ace_unloadPersonEvent", LINKFUNC(unloadPersonLocal)] call CBA_fnc_addEventHandler;
Expand Down Expand Up @@ -209,8 +209,8 @@ if (isServer) then {
}] call CBA_fnc_addEventHandler;

// Request framework
[QGVAR(requestCallback), FUNC(requestCallback)] call CBA_fnc_addEventHandler;
[QGVAR(receiveRequest), FUNC(receiveRequest)] call CBA_fnc_addEventHandler;
[QGVAR(requestCallback), LINKFUNC(requestCallback)] call CBA_fnc_addEventHandler;
[QGVAR(receiveRequest), LINKFUNC(receiveRequest)] call CBA_fnc_addEventHandler;

[QGVAR(systemChatGlobal), {systemChat _this}] call CBA_fnc_addEventHandler;

Expand All @@ -219,7 +219,7 @@ if (isServer) then {
[QGVAR(enableSimulationGlobal), {(_this select 0) enableSimulationGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(setShotParents), {(_this select 0) setShotParents [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;
["ace_setOwner", {(_this select 0) setOwner (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(serverLog), FUNC(serverLog)] call CBA_fnc_addEventHandler;
[QGVAR(serverLog), LINKFUNC(serverLog)] call CBA_fnc_addEventHandler;
[QGVAR(claimSafe), LINKFUNC(claimSafeServer)] call CBA_fnc_addEventHandler;
};

Expand All @@ -236,14 +236,14 @@ if (!isServer) then {
["ACEa", [player]] call CBA_fnc_serverEvent;
}] call CBA_fnc_addEventHandler;
} else {
["ACEa", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler;
["ACEa", LINKFUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler;
};

["ACEe", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
["ACEs", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler;
["ACEe", LINKFUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
["ACEs", LINKFUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler;

if (isServer) then {
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
};


Expand Down Expand Up @@ -392,8 +392,8 @@ addMissionEventHandler ["PlayerViewChanged", {
// Eventhandlers for player controlled machines
//////////////////////////////////////////////////

[QGVAR(displayTextStructured), {_this call FUNC(displayTextStructured)}] call CBA_fnc_addEventHandler;
[QGVAR(displayTextPicture), {_this call FUNC(displayTextPicture)}] call CBA_fnc_addEventHandler;
[QGVAR(displayTextStructured), LINKFUNC(displayTextStructured)] call CBA_fnc_addEventHandler;
[QGVAR(displayTextPicture), LINKFUNC(displayTextPicture)] call CBA_fnc_addEventHandler;

["ace_unconscious", {
params ["_unit", "_isUnconscious"];
Expand All @@ -403,7 +403,7 @@ addMissionEventHandler ["PlayerViewChanged", {
};
}] call CBA_fnc_addEventHandler;

["ace_useItem", DFUNC(useItem)] call CBA_fnc_addEventHandler;
["ace_useItem", LINKFUNC(useItem)] call CBA_fnc_addEventHandler;


//////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_addSyncedEventHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (_name in GVAR(syncedEvents)) exitWith {
false
};

private _eventId = [_name, FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
private _eventId = [_name, LINKFUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
private _data = [_handler, [], _ttl, _eventId];

GVAR(syncedEvents) set [_name, _data];
2 changes: 1 addition & 1 deletion addons/concertina_wire/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ GVAR(deployPFH) = -1;
};
}] call CBA_fnc_addEventHandler;

[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call CBA_fnc_addEventHandler;
[QGVAR(vehicleDamage), LINKFUNC(vehicleDamage)] call CBA_fnc_addEventHandler;
8 changes: 4 additions & 4 deletions addons/cookoff/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include "script_component.hpp"

[QGVAR(engineFire), FUNC(engineFire)] call CBA_fnc_addEventHandler;
[QGVAR(engineFire), LINKFUNC(engineFire)] call CBA_fnc_addEventHandler;
[QGVAR(cookOff), {
params ["_vehicle"];
if (local _vehicle) then {
_this call FUNC(cookOff);
};
}] call CBA_fnc_addEventHandler;
[QGVAR(cookOffEffect), FUNC(cookOffEffect)] call CBA_fnc_addEventHandler;
[QGVAR(smoke), FUNC(smoke)] call CBA_fnc_addEventHandler;
[QGVAR(cookOffBox), FUNC(cookOffBox)] call CBA_fnc_addEventHandler;
[QGVAR(cookOffEffect), LINKFUNC(cookOffEffect)] call CBA_fnc_addEventHandler;
[QGVAR(smoke), LINKFUNC(smoke)] call CBA_fnc_addEventHandler;
[QGVAR(cookOffBox), LINKFUNC(cookOffBox)] call CBA_fnc_addEventHandler;

// handle cleaning up effects when vehicle is deleted mid-cookoff
[QGVAR(addCleanupHandlers), {
Expand Down
4 changes: 2 additions & 2 deletions addons/disarming/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"

[QGVAR(dropItems), FUNC(eventTargetStart)] call CBA_fnc_addEventHandler;
[QGVAR(debugCallback), FUNC(eventCallerFinish)] call CBA_fnc_addEventHandler;
[QGVAR(dropItems), LINKFUNC(eventTargetStart)] call CBA_fnc_addEventHandler;
[QGVAR(debugCallback), LINKFUNC(eventCallerFinish)] call CBA_fnc_addEventHandler;
8 changes: 4 additions & 4 deletions addons/dogtags/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "script_component.hpp"

[QGVAR(showDogtag), DFUNC(showDogtag)] call CBA_fnc_addEventHandler;
[QGVAR(sendDogtagData), DFUNC(sendDogtagData)] call CBA_fnc_addEventHandler;
[QGVAR(getDogtagItem), DFUNC(getDogtagItem)] call CBA_fnc_addEventHandler;
[QGVAR(addDogtagItem), DFUNC(addDogtagItem)] call CBA_fnc_addEventHandler;
[QGVAR(showDogtag), LINKFUNC(showDogtag)] call CBA_fnc_addEventHandler;
[QGVAR(sendDogtagData), LINKFUNC(sendDogtagData)] call CBA_fnc_addEventHandler;
[QGVAR(getDogtagItem), LINKFUNC(getDogtagItem)] call CBA_fnc_addEventHandler;
[QGVAR(addDogtagItem), LINKFUNC(addDogtagItem)] call CBA_fnc_addEventHandler;

// Add actions and event handlers only if ace_medical is loaded
// - Adding actions via config would create a dependency
Expand Down
4 changes: 2 additions & 2 deletions addons/dragging/functions/fnc_carryObject.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ _unit setVariable [QGVAR(releaseActionID), [
] call EFUNC(common,addActionEventHandler)];

// Add anim changed EH
[_unit, "AnimChanged", FUNC(handleAnimChanged), [_unit]] call CBA_fnc_addBISEventHandler;
[_unit, "AnimChanged", LINKFUNC(handleAnimChanged), [_unit]] call CBA_fnc_addBISEventHandler;

// Prevent UAVs from firing
private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew);
Expand All @@ -67,4 +67,4 @@ if (_UAVCrew isNotEqualTo []) then {
};

// Check everything
[FUNC(carryObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(carryObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
4 changes: 2 additions & 2 deletions addons/dragging/functions/fnc_dragObject.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (!GVAR(dragAndFire)) then {
};

// Add anim changed EH
[_unit, "AnimChanged", FUNC(handleAnimChanged), [_unit]] call CBA_fnc_addBISEventHandler;
[_unit, "AnimChanged", LINKFUNC(handleAnimChanged), [_unit]] call CBA_fnc_addBISEventHandler;

// Prevent UAVs from firing
private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew);
Expand All @@ -80,7 +80,7 @@ if (_UAVCrew isNotEqualTo []) then {
};

// Check everything
[FUNC(dragObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(dragObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;

// Fixes not being able to move when in combat pace
[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
2 changes: 1 addition & 1 deletion addons/dragging/functions/fnc_startCarryLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ _unit setVariable [QGVAR(isCarrying), true, true];
// Required for aborting animation
_unit setVariable [QGVAR(carriedObject), _target, true];

[FUNC(startCarryPFH), 0.2, [_unit, _target, _timer]] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(startCarryPFH), 0.2, [_unit, _target, _timer]] call CBA_fnc_addPerFrameHandler;

// Disable collisions by setting the PhysX mass to almost zero
private _mass = getMass _target;
Expand Down
2 changes: 1 addition & 1 deletion addons/dragging/functions/fnc_startDragLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if (_target isKindOf "CAManBase") then {
// Prevents dragging and carrying at the same time
_unit setVariable [QGVAR(isDragging), true, true];

[FUNC(startDragPFH), 0.2, [_unit, _target, CBA_missionTime + 5]] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(startDragPFH), 0.2, [_unit, _target, CBA_missionTime + 5]] call CBA_fnc_addPerFrameHandler;

// Disable collisions by setting the physx mass to almost zero
private _mass = getMass _target;
Expand Down
2 changes: 1 addition & 1 deletion addons/explosives/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
};
};
}] call CBA_fnc_addEventHandler;
[QGVAR(startDefuse), FUNC(startDefuse)] call CBA_fnc_addEventHandler;
[QGVAR(startDefuse), LINKFUNC(startDefuse)] call CBA_fnc_addEventHandler;

//When getting knocked out in medical, trigger deadman explosives:
//Event is global, only run on server (ref: ace_medical_fnc_setUnconscious)
Expand Down
2 changes: 1 addition & 1 deletion addons/explosives/functions/fnc_dialPhone.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for "_i" from 1 to _ran do {
};
if (_unit == ace_player) then {
ctrlSetText [1400,"Calling"];
[FUNC(dialingPhone), 0.25, [_unit,4,_arr,_code]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
[LINKFUNC(dialingPhone), 0.25, [_unit,4,_arr,_code]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
} else {
private _explosive = [_code] call FUNC(getSpeedDialExplosive);
if ((count _explosive) > 0) then {
Expand Down
6 changes: 2 additions & 4 deletions addons/fastroping/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#include "script_component.hpp"

[QGVAR(deployRopes), {
_this call FUNC(deployRopes);
}] call CBA_fnc_addEventHandler;
[QGVAR(deployRopes), LINKFUNC(deployRopes)] call CBA_fnc_addEventHandler;

[QGVAR(startFastRope), {
[FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler;
}] call CBA_fnc_addEventHandler;

// Keybinds
Expand Down
2 changes: 1 addition & 1 deletion addons/fastroping/functions/fnc_fastRope.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ _vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
//Start server PFH asap
[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex, false]] call CBA_fnc_serverEvent;
moveOut _unit;
[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex, diag_tickTime]] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex, diag_tickTime]] call CBA_fnc_addPerFrameHandler;
2 changes: 1 addition & 1 deletion addons/fcs/functions/fnc_firedEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ if (getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(Airburst)) == 1) then {
if (_zeroing < 50) exitWith {};
if (_zeroing > 1500) exitWith {};

[FUNC(handleAirBurstAmmunitionPFH), 0, [_vehicle, _projectile, _zeroing]] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(handleAirBurstAmmunitionPFH), 0, [_vehicle, _projectile, _zeroing]] call CBA_fnc_addPerFrameHandler;
};
4 changes: 2 additions & 2 deletions addons/field_rations/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if !(hasInterface) exitWith {};
] call CBA_fnc_addItemContextMenuOption;

// Add water source helpers when interaction menu is opened
["ace_interactMenuOpened", {call FUNC(addWaterSourceInteractions)}] call CBA_fnc_addEventHandler;
["ace_interactMenuOpened", LINKFUNC(addWaterSourceInteractions)] call CBA_fnc_addEventHandler;

// Add status modifiers
if (["ace_medical"] call EFUNC(common,isModLoaded)) then {
Expand Down Expand Up @@ -134,7 +134,7 @@ if !(hasInterface) exitWith {};
["CAManBase", "respawn", LINKFUNC(handleRespawn)] call CBA_fnc_addClassEventHandler;

// Start update loop
[FUNC(update), CBA_missionTime + MP_SYNC_INTERVAL, 1] call CBA_fnc_waitAndExecute;
[LINKFUNC(update), CBA_missionTime + MP_SYNC_INTERVAL, 1] call CBA_fnc_waitAndExecute;

#ifdef DEBUG_MODE_FULL
["ACE_player thirst", {ACE_player getVariable [QXGVAR(thirst), 0]}, [true, 0, 100]] call EFUNC(common,watchVariable);
Expand Down
4 changes: 2 additions & 2 deletions addons/field_rations/functions/fnc_update.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private _player = ACE_player;

// Exit if player is not alive or a virtual unit
if (!alive _player || {_player isKindOf "VirtualMan_F"}) exitWith {
[FUNC(update), _nextMpSync, 1] call CBA_fnc_waitAndExecute;
[LINKFUNC(update), _nextMpSync, 1] call CBA_fnc_waitAndExecute;
QGVAR(hud) cutFadeOut 0.5;
};

Expand Down Expand Up @@ -73,4 +73,4 @@ if (!EGVAR(common,OldIsCamera) && {_thirst > XGVAR(hudShowLevel) || {_hunger > X
QGVAR(hud) cutFadeOut 0.5;
};

[FUNC(update), _nextMpSync, 1] call CBA_fnc_waitAndExecute;
[LINKFUNC(update), _nextMpSync, 1] call CBA_fnc_waitAndExecute;
2 changes: 1 addition & 1 deletion addons/finger/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (!hasInterface) exitWith {};
GVAR(fingersHash) = createHashMap;
GVAR(pfeh_id) = -1;

[QGVAR(fingered), {_this call FUNC(incomingFinger)}] call CBA_fnc_addEventHandler;
[QGVAR(fingered), LINKFUNC(incomingFinger)] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler;

//Add Keybind:
Expand Down
4 changes: 2 additions & 2 deletions addons/fire/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"

[QGVAR(burn), FUNC(burn)] call CBA_fnc_addEventHandler;
[QGVAR(burn), LINKFUNC(burn)] call CBA_fnc_addEventHandler;
[QGVAR(playScream), {
params ["_scream", "_source"];
// only play sound if enabled in settings and enabled for the unit
Expand Down Expand Up @@ -31,7 +31,7 @@
[GVAR(fireSources), _key] call CBA_fnc_hashRem;
}] call CBA_fnc_addEventHandler;

[{ _this call FUNC(fireManagerPFH) }, FIRE_MANAGER_PFH_DELAY, []] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(fireManagerPFH), FIRE_MANAGER_PFH_DELAY, []] call CBA_fnc_addPerFrameHandler;
GVAR(fireSources) = [[], nil] call CBA_fnc_hashCreate;
};
}] call CBA_fnc_addEventHandler;
4 changes: 2 additions & 2 deletions addons/fire/functions/fnc_burn.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ if (_isBurning) exitWith {};

private _burnIndicatorPFH = _unit getVariable [QGVAR(burnUIPFH), -1];
if (_unit isEqualTo ace_player && { _isThisUnitAlive } && { _burnIndicatorPFH < 0 }) then {
_burnIndicatorPFH = [FUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler;
_burnIndicatorPFH = [LINKFUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler;
_unit setVariable [QGVAR(burnUIPFH), _burnIndicatorPFH];
};
};
Expand Down Expand Up @@ -296,7 +296,7 @@ if (_isBurning) exitWith {};

if (local _unit) then {
if (_unit isEqualTo ace_player) then {
private _burnIndicatorPFH = [FUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler;
private _burnIndicatorPFH = [LINKFUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler;
_unit setVariable [QGVAR(burnUIPFH), _burnIndicatorPFH];
};

Expand Down
Loading

0 comments on commit 415d2f6

Please sign in to comment.