Replace ACE event system calls with CBA counterparts

Regex used:

\[(.+?),(.+?),(.+?)\]\s+call\s+E?FUNC\((common,)?(target|object)Event\)
[$1,$3,$2] call CBA_fnc_targetEvent

E?FUNC\((common,)?(server|global|local)Event\)
CBA_fnc_$2Event

E?FUNC\((common,)?(add|remove)EventHandler\)
CBA_fnc_$2EventHandler
This commit is contained in:
SilentSpike 2016-05-22 16:29:05 +01:00
parent f0b8da33c4
commit 108ff4f644
241 changed files with 582 additions and 566 deletions

View File

@ -32,8 +32,8 @@ if (!hasInterface) exitWith {};
[] call FUNC(initializeTerrainExtension);
// Register fire event handler
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
["firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
["firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
//Add warnings for missing compat PBOs (only if AB is on)
{
@ -50,7 +50,7 @@ if (!hasInterface) exitWith {};
["iansky_opt","ace_compat_sma3_iansky"],
["R3F_Armes","ace_compat_r3f"]
];
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
#ifdef DEBUG_MODE_FULL
call FUNC(diagnoseWeapons);

View File

@ -49,4 +49,4 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
[] call FUNC(init);
[] call FUNC(restore_user_data);
["RangerfinderData", {_this call FUNC(sord)}] call EFUNC(common,addEventHandler);
["RangerfinderData", {_this call FUNC(sord)}] call CBA_fnc_addEventHandler;

View File

@ -3,4 +3,4 @@
if (!hasInterface) exitWith {};
//If attach placing, stop when opening menu:
["interactMenuOpened", {GVAR(placeAction) = 0;}] call EFUNC(common,addEventHandler);
["interactMenuOpened", {GVAR(placeAction) = 0;}] call CBA_fnc_addEventHandler;

View File

@ -1,3 +1,3 @@
#include "script_component.hpp"
["backpackOpened", {_this call FUNC(backpackOpened)}] call EFUNC(common,addEventHandler);
["backpackOpened", {_this call FUNC(backpackOpened)}] call CBA_fnc_addEventHandler;

View File

@ -24,7 +24,7 @@ private _target = objectParent _backpack;
if (isNull _target) exitWith {false};
// raise event on target unit
["backpackOpened", _target, [_target, _backpack]] call EFUNC(common,targetEvent);
["backpackOpened", [_target, _backpack], _target] call CBA_fnc_targetEvent;
// return false to open inventory as usual
false

View File

@ -5,7 +5,7 @@
[{
GVAR(captivityEnabled) = true;
}, [], 0.05] call EFUNC(common,waitAndExecute);
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
//Handles when someone starts escorting and then disconnects, leaving the captive attached
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
@ -24,15 +24,15 @@ if (isServer) then {
}];
};
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call CBA_fnc_addEventHandler;
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call CBA_fnc_addEventHandler;
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call CBA_fnc_addEventHandler;
["SetSurrendered", {_this call FUNC(setSurrendered)}] call CBA_fnc_addEventHandler;
//Medical Integration Events
["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call EFUNC(common,addEventHandler);
["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {};

View File

@ -21,6 +21,6 @@ params ["_unit", "_target"];
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent);
["SetHandcuffed", [_target, true], [_target]] call CBA_fnc_targetEvent;
_unit removeItem "ACE_CableTie";

View File

@ -47,4 +47,4 @@ if (isNull _vehicle) then {
if (isNull _vehicle) exitWith {ERROR("");};
_unit setVariable [QGVAR(isEscorting), false, true];
["MoveInCaptive", [_target], [_target, _vehicle]] call EFUNC(common,targetEvent);
["MoveInCaptive", [_target, _vehicle], [_target]] call CBA_fnc_targetEvent;

View File

@ -17,4 +17,4 @@
params ["_unit", "_target"];
["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent);
["SetHandcuffed", [_target, false], [_target]] call CBA_fnc_targetEvent;

View File

@ -18,4 +18,4 @@
params ["_unit", "_target"];
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);
["MoveOutCaptive", [_target], [_target]] call CBA_fnc_targetEvent;

View File

@ -30,7 +30,7 @@ if (!isServer) exitWith {};
params ["_units"];
{
TRACE_2("event",_x,local _x);
["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
["SetHandcuffed", [_x, true], [_x]] call CBA_fnc_targetEvent;
} forEach _units;
}, [_units], 0.05] call EFUNC(common,waitAndExecute);

View File

@ -30,7 +30,7 @@ if (!isServer) exitWith {};
params ["_units"];
{
TRACE_2("event",_x,local _x);
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
["SetSurrendered", [_x, true], [_x]] call CBA_fnc_targetEvent;
} forEach _units;
}, [_units], 0.05] call EFUNC(common,waitAndExecute);

View File

@ -124,4 +124,4 @@ if (_state) then {
};
//Global Event after changes:
["CaptiveStatusChanged", [_unit, _state, "SetHandcuffed"]] call EFUNC(common,globalEvent);
["CaptiveStatusChanged", [_unit, _state, "SetHandcuffed"]] call CBA_fnc_globalEvent;

View File

@ -117,4 +117,4 @@ if (_state) then {
};
//Global Event after changes:
["CaptiveStatusChanged", [_unit, _state, "SetSurrendered"]] call EFUNC(common,globalEvent);
["CaptiveStatusChanged", [_unit, _state, "SetSurrendered"]] call CBA_fnc_globalEvent;

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
["AddCargoByClass", {_this call FUNC(addCargoItem)}] call EFUNC(common,addEventHandler);
["AddCargoByClass", {_this call FUNC(addCargoItem)}] call CBA_fnc_addEventHandler;
["LoadCargo", {
params ["_item", "_vehicle"];
@ -13,13 +13,13 @@
private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call CBA_fnc_localEvent;
if (_loaded) then {
// Invoke listenable event
["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
["cargoLoaded", [_item, _vehicle]] call CBA_fnc_globalEvent;
};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
["UnloadCargo", {
params ["_item", "_vehicle", ["_unloader", objNull]];
@ -34,19 +34,19 @@
private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call CBA_fnc_localEvent;
if (_unloaded) then {
// Invoke listenable event
["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
["cargoUnloaded", [_item, _vehicle]] call CBA_fnc_globalEvent;
};
// TOOO maybe drag/carry the unloaded item?
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
["ServerUnloadCargo", {
params ["_item", "_emptyPosAGL"];
_item hideObjectGlobal false;
_item setPosASL (AGLtoASL _emptyPosAGL);
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;

View File

@ -26,4 +26,4 @@ for "_i" from 1 to _amount do {
};
// Invoke listenable event
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call CBA_fnc_globalEvent;

View File

@ -29,7 +29,7 @@ if (isServer) then {
_cargoClassname = getText (_x >> "type");
_cargoCount = getNumber (_x >> "amount");
TRACE_3("adding ACE_Cargo", (configName _x), _cargoClassname, _cargoCount);
["AddCargoByClass", [_cargoClassname, _vehicle, _cargoCount]] call EFUNC(common,localEvent);
["AddCargoByClass", [_cargoClassname, _vehicle, _cargoCount]] call CBA_fnc_localEvent;
};
} count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo"));
};

View File

@ -35,7 +35,7 @@ _vehicle setVariable [QGVAR(space), _space - _itemSize, true];
if (_item isEqualType objNull) then {
detach _item;
_item attachTo [_vehicle,[0,0,-100]];
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
["hideObjectGlobal", [_item, true]] call CBA_fnc_serverEvent;
};
true

View File

@ -40,7 +40,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
[
5 * _size,
[_object,_vehicle],
{["LoadCargo", _this select 0] call EFUNC(common,localEvent)},
{["LoadCargo", _this select 0] call CBA_fnc_localEvent},
{},
localize LSTRING(LoadingItem)
] call EFUNC(common,progressBar);
@ -48,7 +48,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
} else {
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
["displayTextStructured", [[LSTRING(LoadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
["displayTextStructured", [[LSTRING(LoadingFailed), _displayName], 3.0]] call CBA_fnc_localEvent;
};
_return

View File

@ -37,7 +37,7 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then
[
5 * _size,
[_item, GVAR(interactionVehicle), ACE_player],
{["UnloadCargo", _this select 0] call EFUNC(common,localEvent)},
{["UnloadCargo", _this select 0] call CBA_fnc_localEvent},
{},
localize LSTRING(UnloadingItem),
{true},
@ -47,5 +47,5 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
private _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call CBA_fnc_localEvent;
};

View File

@ -29,7 +29,7 @@ if ((count _emptyPosAGL) != 3) exitWith {
TRACE_4("Could not find unload pos",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle);
if ((!isNull _unloader) && {_unloader == ACE_player}) then {
//display text saying there are no safe places to exit the vehicle
["displayTextStructured", [localize ELSTRING(common,NoRoomToUnload)]] call EFUNC(common,localEvent);
["displayTextStructured", [localize ELSTRING(common,NoRoomToUnload)]] call CBA_fnc_localEvent;
};
false
};
@ -52,7 +52,7 @@ if (_item isEqualType objNull) then {
detach _item;
// hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly
// do both on server to ensure they are executed in the correct order
["ServerUnloadCargo", [_item, _emptyPosAGL]] call EFUNC(common,serverEvent);
["ServerUnloadCargo", [_item, _emptyPosAGL]] call CBA_fnc_serverEvent;
} else {
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""];
_newItem setPosASL (AGLtoASL _emptyPosAGL);

View File

@ -1,111 +1,111 @@
class RscInGameUI {
class RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoNoHUD {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoSoldier: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Soldier')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Soldier')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoTank: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoAirNoWeapon: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoAir: RscUnitInfoAirNoWeapon {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
};
class RscUnitInfo_AH64D_gunner {
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoUAV {
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgUAV', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'UAV')])] call FUNC(localEvent););
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgUAV', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'UAV')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoSubmarine: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Submarine')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Submarine')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoShip: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Ship')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Ship')])] call CBA_fnc_localEvent;);
};
class RscWeaponEmpty {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinder {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeArtillery {
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call FUNC(localEvent););
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeArtilleryAuto {
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call FUNC(localEvent););
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderPAS13 {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_LaserDesignator {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderMAAWS {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderAbramsCom {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderAbramsGun {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderStrykerMGSGun {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_strider_commander {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_titan {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_punisher {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_SDV_periscope {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoParachute: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Parachute')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Parachute')])] call CBA_fnc_localEvent;);
};
class RscUnitVehicle {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_LaserDesignator_02 {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscStaminaBar {

View File

@ -59,7 +59,7 @@
//////////////////////////////////////////////////
//Status Effect EHs:
["setStatusEffect", {_this call FUNC(statusEffect_set)}] call FUNC(addEventHandler);
["setStatusEffect", {_this call FUNC(statusEffect_set)}] call CBA_fnc_addEventHandler;
["forceWalk", false, ["ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_dragging"]] call FUNC(statusEffect_addType);
["blockSprint", false, []] call FUNC(statusEffect_addType);
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), QEGVAR(medical,unconscious)]] call FUNC(statusEffect_addType);
@ -70,17 +70,17 @@
params ["_object", "_set"];
TRACE_2("forceWalk EH",_object,_set);
_object forceWalk (_set > 0);
}] call FUNC(addEventHandler);
}] call CBA_fnc_addEventHandler;
["blockSprint", { //Name reversed from `allowSprint` because we want NOR logic
params ["_object", "_set"];
TRACE_2("blockSprint EH",_object,_set);
_object allowSprint (_set == 0);
}] call FUNC(addEventHandler);
}] call CBA_fnc_addEventHandler;
["setCaptive", {
params ["_object", "_set"];
TRACE_2("setCaptive EH",_object,_set);
_object setCaptive (_set > 0);
}] call FUNC(addEventHandler);
}] call CBA_fnc_addEventHandler;
["blockDamage", { //Name reversed from `allowDamage` because we want NOR logic
params ["_object", "_set"];
if ((_object isKindOf "CAManBase") && {(["ace_medical"] call FUNC(isModLoaded))}) then {
@ -90,12 +90,12 @@
TRACE_2("blockDamage EH (using allowDamage)",_object,_set);
_object allowDamage (_set == 0);
};
}] call FUNC(addEventHandler);
}] call CBA_fnc_addEventHandler;
["blockEngine", {
params ["_vehicle", "_set"];
_vehicle setVariable [QGVAR(blockEngine), _set > 0, true];
_vehicle engineOn false;
}] call FUNC(addEventHandler);
}] call CBA_fnc_addEventHandler;
//Add a fix for BIS's zeus remoteControl module not reseting variables on DC when RC a unit
//This variable is used for isPlayer checks
@ -126,46 +126,46 @@ if (isServer) then {
_settingData set [6, _force];
};
}] call FUNC(addEventhandler);
}] call CBA_fnc_addEventHandler;
// Event to log Fix Headbug output
["HeadbugFixUsed", {
params ["_profileName", "_animation"];
ACE_LOGINFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation);
}] call FUNC(addEventHandler);
}] call CBA_fnc_addEventHandler;
["fixCollision", FUNC(fixCollision)] call FUNC(addEventhandler);
["fixFloating", FUNC(fixFloating)] call FUNC(addEventhandler);
["fixPosition", FUNC(fixPosition)] call FUNC(addEventhandler);
["fixCollision", FUNC(fixCollision)] call CBA_fnc_addEventHandler;
["fixFloating", FUNC(fixFloating)] call CBA_fnc_addEventHandler;
["fixPosition", FUNC(fixPosition)] call CBA_fnc_addEventHandler;
["loadPersonEvent", FUNC(loadPersonLocal)] call FUNC(addEventhandler);
["unloadPersonEvent", FUNC(unloadPersonLocal)] call FUNC(addEventhandler);
["loadPersonEvent", FUNC(loadPersonLocal)] call CBA_fnc_addEventHandler;
["unloadPersonEvent", FUNC(unloadPersonLocal)] call CBA_fnc_addEventHandler;
["lockVehicle", {
_this setVariable [QGVAR(lockStatus), locked _this];
_this lock 2;
}] call FUNC(addEventhandler);
}] call CBA_fnc_addEventHandler;
["unlockVehicle", {
_this lock (_this getVariable [QGVAR(lockStatus), locked _this]);
}] call FUNC(addEventhandler);
}] call CBA_fnc_addEventHandler;
["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler);
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
["engineOn", {(_this select 0) engineOn (_this select 1)}] call FUNC(addEventhandler);
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler);
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler);
["playMove", {(_this select 0) playMove (_this select 1)}] call FUNC(addEventHandler);
["playMoveNow", {(_this select 0) playMoveNow (_this select 1)}] call FUNC(addEventHandler);
["switchMove", {(_this select 0) switchMove (_this select 1)}] call FUNC(addEventHandler);
["setVectorDirAndUp", {(_this select 0) setVectorDirAndUp (_this select 1)}] call FUNC(addEventHandler);
["setVanillaHitPointDamage", {(_this select 0) setHitPointDamage (_this select 1)}] call FUNC(addEventHandler);
["setDir", {(_this select 0) setDir (_this select 1)}] call CBA_fnc_addEventHandler;
["setFuel", {(_this select 0) setFuel (_this select 1)}] call CBA_fnc_addEventHandler;
["engineOn", {(_this select 0) engineOn (_this select 1)}] call CBA_fnc_addEventHandler;
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call CBA_fnc_addEventHandler;
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call CBA_fnc_addEventHandler;
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call CBA_fnc_addEventHandler;
["playMove", {(_this select 0) playMove (_this select 1)}] call CBA_fnc_addEventHandler;
["playMoveNow", {(_this select 0) playMoveNow (_this select 1)}] call CBA_fnc_addEventHandler;
["switchMove", {(_this select 0) switchMove (_this select 1)}] call CBA_fnc_addEventHandler;
["setVectorDirAndUp", {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler;
["setVanillaHitPointDamage", {(_this select 0) setHitPointDamage (_this select 1)}] call CBA_fnc_addEventHandler;
if (isServer) then {
["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler);
["enableSimulationGlobal", {(_this select 0) enableSimulationGlobal (_this select 1)}] call FUNC(addEventHandler);
["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
["enableSimulationGlobal", {(_this select 0) enableSimulationGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
};
@ -178,14 +178,14 @@ if (isServer) then {
if (!isServer) then {
["PlayerJip", {
ACE_LOGINFO("JIP event synchronization initialized");
["SEH_all", [player]] call FUNC(serverEvent);
}] call FUNC(addEventHandler);
["SEH_all", [player]] call CBA_fnc_serverEvent;
}] call CBA_fnc_addEventHandler;
} else {
["SEH_all", FUNC(_handleRequestAllSyncedEvents)] call FUNC(addEventHandler);
["SEH_all", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler;
};
["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
["SEH_s", FUNC(_handleRequestSyncedEvent)] call FUNC(addEventHandler);
["SEH", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
["SEH_s", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler;
if (isServer) then {
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
@ -227,7 +227,7 @@ call FUNC(checkFiles);
GVAR(checkPBOsCheckAll),
GVAR(checkPBOsWhitelist)
] call FUNC(checkPBOs)
}] call FUNC(addEventHandler);
}] call CBA_fnc_addEventHandler;
// Create a pfh to wait until all postinits are ready and settings are initialized
[{
@ -254,7 +254,7 @@ call FUNC(checkFiles);
[] call FUNC(readSettingsFromParamsArray);
};
// Event so that ACE_Modules have their settings loaded:
["InitSettingsFromModules", []] call FUNC(localEvent);
["InitSettingsFromModules", []] call CBA_fnc_localEvent;
if (isServer) then {
// Publish all settings data after all configs and modules are read
@ -270,7 +270,7 @@ call FUNC(checkFiles);
ACE_LOGINFO("Settings initialized.");
//Event that settings are safe to use:
["SettingsInitialized", []] call FUNC(localEvent);
["SettingsInitialized", []] call CBA_fnc_localEvent;
//Set init finished and run all delayed functions:
GVAR(settingsInitFinished) = true;
@ -318,7 +318,7 @@ enableCamShake true;
if (alive _oldPlayer) then {
[_oldPlayer] call FUNC(setName);
};
}] call FUNC(addEventhandler);
}] call CBA_fnc_addEventHandler;
//////////////////////////////////////////////////
@ -350,7 +350,7 @@ GVAR(OldIsCamera) = false;
uiNamespace setVariable ["ACE_player", _data];
// Raise ACE event locally
["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
["playerChanged", [ACE_player, _oldPlayer]] call CBA_fnc_localEvent;
};
// "playerVehicleChanged" event
@ -358,7 +358,7 @@ GVAR(OldIsCamera) = false;
if !(_data isEqualTo GVAR(OldPlayerVehicle)) then {
// Raise ACE event locally
GVAR(OldPlayerVehicle) = _data;
["playerVehicleChanged", [ACE_player, _data]] call FUNC(localEvent);
["playerVehicleChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "playerTurretChanged" event
@ -366,7 +366,7 @@ GVAR(OldIsCamera) = false;
if !(_data isEqualTo GVAR(OldPlayerTurret)) then {
// Raise ACE event locally
GVAR(OldPlayerTurret) = _data;
["playerTurretChanged", [ACE_player, _data]] call FUNC(localEvent);
["playerTurretChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "playerWeaponChanged" event
@ -374,7 +374,7 @@ GVAR(OldIsCamera) = false;
if (_data != GVAR(OldPlayerWeapon)) then {
// Raise ACE event locally
GVAR(OldPlayerWeapon) = _data;
["playerWeaponChanged", [ACE_player, _data]] call FUNC(localEvent);
["playerWeaponChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "playerInventoryChanged" event
@ -406,7 +406,7 @@ GVAR(OldIsCamera) = false;
if !(_data isEqualTo GVAR(OldPlayerInventoryNoAmmo)) then {
GVAR(OldPlayerInventoryNoAmmo) = _data;
["playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call FUNC(localEvent);
["playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call CBA_fnc_localEvent;
};
};
@ -415,7 +415,7 @@ GVAR(OldIsCamera) = false;
if !(_data isEqualTo GVAR(OldPlayerVisionMode)) then {
// Raise ACE event locally
GVAR(OldPlayerVisionMode) = _data;
["playerVisionModeChanged", [ACE_player, _data]] call FUNC(localEvent);
["playerVisionModeChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "cameraViewChanged" event
@ -423,7 +423,7 @@ GVAR(OldIsCamera) = false;
if !(_data isEqualTo GVAR(OldCameraView)) then {
// Raise ACE event locally
GVAR(OldCameraView) = _data;
["cameraViewChanged", [ACE_player, _data]] call FUNC(localEvent);
["cameraViewChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "visibleMapChanged" event
@ -431,7 +431,7 @@ GVAR(OldIsCamera) = false;
if (!_data isEqualTo GVAR(OldVisibleMap)) then {
// Raise ACE event locally
GVAR(OldVisibleMap) = _data;
["visibleMapChanged", [ACE_player, _data]] call FUNC(localEvent);
["visibleMapChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "activeCameraChanged" event
@ -439,7 +439,7 @@ GVAR(OldIsCamera) = false;
if !(_data isEqualTo GVAR(OldIsCamera)) then {
// Raise ACE event locally
GVAR(OldIsCamera) = _data;
["activeCameraChanged", [ACE_player, _data]] call FUNC(localEvent);
["activeCameraChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
END_COUNTER(stateChecker);
@ -450,8 +450,8 @@ GVAR(OldIsCamera) = false;
// Eventhandlers for player controlled machines
//////////////////////////////////////////////////
["displayTextStructured", {_this call FUNC(displayTextStructured)}] call FUNC(addEventhandler);
["displayTextPicture", {_this call FUNC(displayTextPicture)}] call FUNC(addEventhandler);
["displayTextStructured", {_this call FUNC(displayTextStructured)}] call CBA_fnc_addEventHandler;
["displayTextPicture", {_this call FUNC(displayTextPicture)}] call CBA_fnc_addEventHandler;
["medical_onUnconscious", {
params ["_unit", "_isUnconscious"];
@ -459,9 +459,9 @@ GVAR(OldIsCamera) = false;
if (local _unit && {!_isUnconscious}) then {
[_unit, false, QFUNC(loadPerson), west /* dummy side */] call FUNC(switchToGroupSide);
};
}] call FUNC(addEventhandler);
}] call CBA_fnc_addEventHandler;
["useItem", DFUNC(useItem)] call FUNC(addEventHandler);
["useItem", DFUNC(useItem)] call CBA_fnc_addEventHandler;
//////////////////////////////////////////////////
@ -499,7 +499,7 @@ if (didJip) then {
// We are jipping! Get ready and wait, and throw the event
[{
if(!isNull player && GVAR(settingsInitFinished)) then {
["PlayerJip", [player]] call FUNC(localEvent);
["PlayerJip", [player]] call CBA_fnc_localEvent;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
}, 0, []] call CBA_fnc_addPerFrameHandler;

View File

@ -18,7 +18,7 @@ params ["_client"];
private _eventEntry = HASH_GET(GVAR(syncedEvents),_x);
_eventEntry params ["", "_eventLog"];
["SEH_s", _client, [_x, _eventLog]] call FUNC(targetEvent);
["SEH_s", [_x, _eventLog], _client] call CBA_fnc_targetEvent;
false
} count (GVAR(syncedEvents) select 0);

View File

@ -30,7 +30,7 @@ if (isServer) then {
private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
_eventEntry params ["", "_eventLog"];
["SEH_s", _client, [_eventName, _eventLog]] call FUNC(targetEvent);
["SEH_s", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent;
} else {
params ["_eventName", "_eventLog"];

View File

@ -37,4 +37,4 @@ missionNamespace setVariable [_name, _value];
GVAR(settings) pushBack _this;
// Raise event locally
["SettingChanged", [_name, _value]] call FUNC(localEvent);
["SettingChanged", [_name, _value]] call CBA_fnc_localEvent;

View File

@ -24,7 +24,7 @@ if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
false
};
private _eventId = [_name, FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
private _eventId = [_name, FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
private _data = [_handler, [], _ttl, _eventId];
HASH_SET(GVAR(syncedEvents),_name,_data);

View File

@ -48,4 +48,4 @@ GVAR(AssignedItemsShownItems) = [
showWatch _showWatch;
showRadio _showRadio;
showGPS (_showGPS || {cameraOn == getConnectedUAV _unit}); //If player is activly controling a UAV, showGPS controls showing the map (m key)
}] call FUNC(addEventHandler);
}] call CBA_fnc_addEventHandler;

View File

@ -46,7 +46,7 @@ if ((_namespace getVariable [_uid, [-99999]]) select 0 < ACE_diagTime) then {
} forEach _cacheList;
// Empty the list
missionNamespace setVariable [_varName, []];
}] call FUNC(addEventhandler);
}] call CBA_fnc_addEventHandler;
};
// Add this cache to the list of the event

View File

@ -28,9 +28,9 @@ _target setVariable [QGVAR(owner), _unit, true];
// lock target object
if (_lockTarget) then {
if (!isNull _unit) then {
["lockVehicle", _target, _target] call FUNC(targetEvent);
["lockVehicle", _target, _target] call CBA_fnc_targetEvent;
} else {
["unlockVehicle", _target, _target] call FUNC(targetEvent);
["unlockVehicle", _target, _target] call CBA_fnc_targetEvent;
};
};

View File

@ -41,34 +41,34 @@ TRACE_2("",local _unit,vehicle _unit);
switch (_priority) do {
case 0: {
if (_unit == vehicle _unit) then {
["playMove", _unit, [_unit, _animation]] call FUNC(objectEvent);
["playMove", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
["playMove", [_unit, _animation]] call FUNC(globalEvent);
["playMove", [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
case 1: {
if (_unit == vehicle _unit) then {
["playMoveNow", _unit, [_unit, _animation]] call FUNC(objectEvent);
["playMoveNow", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
["playMoveNow", [_unit, _animation]] call FUNC(globalEvent);
["playMoveNow", [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
case 2: {
// try playMoveNow first
if (_unit == vehicle _unit) then {
["playMoveNow", _unit, [_unit, _animation]] call FUNC(objectEvent);
["playMoveNow", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
["playMoveNow", [_unit, _animation]] call FUNC(globalEvent);
["playMoveNow", [_unit, _animation]] call CBA_fnc_globalEvent;
};
// if animation doesn't respond, do switchMove
if (animationState _unit != _animation) then {
TRACE_1("did not respond to playMoveNow",animationState _unit);
// Execute on all machines. SwitchMove has local effects.
["switchMove", [_unit, _animation]] call FUNC(globalEvent);
["switchMove", [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
default {};

View File

@ -26,12 +26,12 @@ TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile
if (_unit isKindOf "CAManBase") then {
// The unit it on foot
if (_unit == ACE_player) then {
["firedPlayer", _this] call FUNC(localEvent);
["firedPlayer", _this] call CBA_fnc_localEvent;
} else {
if ([_unit] call EFUNC(common,isPlayer)) then {
["firedPlayerNonLocal", _this] call FUNC(localEvent);
["firedPlayerNonLocal", _this] call CBA_fnc_localEvent;
} else {
["firedNonPlayer", _this] call FUNC(localEvent);
["firedNonPlayer", _this] call CBA_fnc_localEvent;
};
};
} else {
@ -55,12 +55,12 @@ if (_unit isKindOf "CAManBase") then {
};
if (_gunner == ACE_player) then {
["firedPlayerVehicle", _this] call FUNC(localEvent);
["firedPlayerVehicle", _this] call CBA_fnc_localEvent;
} else {
if ([_gunner] call EFUNC(common,isPlayer)) then {
["firedPlayerVehicleNonLocal", _this] call FUNC(localEvent);
["firedPlayerVehicleNonLocal", _this] call CBA_fnc_localEvent;
} else {
["firedNonPlayerVehicle", _this] call FUNC(localEvent);
["firedNonPlayerVehicle", _this] call CBA_fnc_localEvent;
};
};
};

View File

@ -21,7 +21,7 @@ if (!local _object) exitWith {};
if (_object isKindOf "CAManBase") exitWith {};
//We need to manually set allowDamage to true for setHitIndex to function
["blockDamage", [_object, 0]] call FUNC(localEvent);
["blockDamage", [_object, 0]] call CBA_fnc_localEvent;
// save and restore hitpoints, see below why
private _hitPointDamages = getAllHitPointsDamage _object;
@ -41,4 +41,4 @@ _object setDamage damage _object;
//manually re-enable allowDamage to previous setting (ref statusEffect_funcs)
private _effectVarName = format [QGVAR(effect_%1), "blockDamage"];
private _effectNumber = _object getVariable [_effectVarName, 0];
["blockDamage", [_object, _effectNumber]] call FUNC(localEvent);
["blockDamage", [_object, _effectNumber]] call CBA_fnc_localEvent;

View File

@ -17,8 +17,8 @@
private _unit = ACE_player;
private _anim = animationState _unit;
["HeadbugFixUsed", [profileName, _anim]] call FUNC(serverEvent);
["HeadbugFixUsed", [profileName, _anim]] call FUNC(localEvent);
["HeadbugFixUsed", [profileName, _anim]] call CBA_fnc_serverEvent;
["HeadbugFixUsed", [profileName, _anim]] call CBA_fnc_localEvent;
if (_unit != vehicle _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false};

View File

@ -28,5 +28,5 @@ if !(_reason in _setHiddenReasons) then {
};
if !(isObjectHidden _unit) then {
["hideObjectGlobal", [_unit, true]] call FUNC(serverEvent);
["hideObjectGlobal", [_unit, true]] call CBA_fnc_serverEvent;
};

View File

@ -32,7 +32,7 @@ private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F"],
if (!isNull _vehicle) then {
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
["loadPersonEvent", _unit, [_unit, _vehicle, _caller]] call FUNC(objectEvent);
["loadPersonEvent", [_unit, _vehicle, _caller], _unit] call CBA_fnc_targetEvent;
};
_vehicle

View File

@ -29,6 +29,6 @@ private _speaker = speaker _unit;
if (_speaker == "ACE_NoVoice") exitWith {};
["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(globalEvent);
["setSpeaker", [_unit, "ACE_NoVoice"]] call CBA_fnc_globalEvent;
_unit setVariable ["ACE_OriginalSpeaker", _speaker, true];

View File

@ -16,5 +16,5 @@ params ["_unit"];
// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {
["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(localEvent);
["setSpeaker", [_unit, "ACE_NoVoice"]] call CBA_fnc_localEvent;
};

View File

@ -18,4 +18,4 @@ params ["_unit"];
_unit setVariable [QGVAR(muteUnitReasons), _unit getVariable [QGVAR(muteUnitReasons), []], true];
// fix mp issues with respawning and the speaker
["setSpeaker", [_unit, speaker _unit]] call FUNC(globalEvent);
["setSpeaker", [_unit, speaker _unit]] call CBA_fnc_globalEvent;

View File

@ -82,13 +82,13 @@ _ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safezoneW /
if (_errorCode == 0) then {
if (_onFinish isEqualType "") then {
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call CBA_fnc_localEvent;
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
};
} else {
if (_onFail isEqualType "") then {
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call CBA_fnc_localEvent;
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
};

View File

@ -22,5 +22,5 @@ if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
private _data = HASH_GET(GVAR(syncedEvents),_name);
_data params ["", "", "", "_eventId"];
[_eventId] call FUNC(removeEventHandler);
[_eventId] call CBA_fnc_removeEventHandler;
HASH_REM(GVAR(syncedEvents),_name);

View File

@ -17,4 +17,4 @@ params ["_eventName"];
// Only JIP machines on initialization send this off, requesting sync on events with the serverCommand
if (isServer) exitWith {false};
["SEH_s", [_eventName, ACE_player] ] call FUNC(serverEvent);
["SEH_s", [_eventName, ACE_player] ] call CBA_fnc_serverEvent;

View File

@ -78,8 +78,8 @@ if (isServer && {_broadcastChanges}) then {
publicVariable _name;
// Raise event globally, this publicizes eventual changes in _force status so clients can update it locally
["SettingChanged", [_name, _value, _force]] call FUNC(globalEvent);
["SettingChanged", [_name, _value, _force]] call CBA_fnc_globalEvent;
} else {
// Raise event locally
["SettingChanged", [_name, _value, _force]] call FUNC(localEvent);
["SettingChanged", [_name, _value, _force]] call CBA_fnc_localEvent;
};

View File

@ -32,15 +32,15 @@ if (isNull _object) exitWith {};
if (_effectNumber != -1) then {
if (GVAR(statusEffect_isGlobal) select _forEachIndex) then {
TRACE_2("Sending Global Event", _object, _effectNumber);
[_x, [_object, _effectNumber]] call FUNC(globalEvent);
[_x, [_object, _effectNumber]] call CBA_fnc_globalEvent;
} else {
if (local _object) then {
//If local, send directly to bypass network delay of targetEvent call
TRACE_2("Sending Target Local Event", _object, _effectNumber);
[_x, [_object, _effectNumber]] call FUNC(localEvent);
[_x, [_object, _effectNumber]] call CBA_fnc_localEvent;
} else {
TRACE_2("Sending Target Non-Local Event", _object, _effectNumber);
[_x, [_object], [_object, _effectNumber]] call FUNC(targetEvent);
[_x, [_object, _effectNumber], [_object]] call CBA_fnc_targetEvent;
};
};
};

View File

@ -23,4 +23,4 @@ if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
private _eventData = [_name, _args, _ttl];
["SEH", _eventData] call FUNC(globalEvent);
["SEH", _eventData] call CBA_fnc_globalEvent;

View File

@ -28,5 +28,5 @@ if (_reason in _setHiddenReasons) then {
};
if (_setHiddenReasons isEqualTo []) then {
["hideObjectGlobal",[_unit,false]] call FUNC(serverEvent);
["hideObjectGlobal",[_unit,false]] call CBA_fnc_serverEvent;
};

View File

@ -26,7 +26,7 @@ if (_vehicle == _unit) exitWith {false};
if (speed _vehicle > 1 || {((getPos _vehicle) select 2) > 2}) exitWith {false};
if (!isNull _vehicle) then {
["unloadPersonEvent", [_unit], [_unit, _vehicle]] call EFUNC(common,targetEvent);
["unloadPersonEvent", [_unit, _vehicle], [_unit]] call CBA_fnc_targetEvent;
};
true

View File

@ -27,7 +27,7 @@ if (count _emptyPos != 3) exitwith {
ACE_LOGWARNING_4("Could not find unload pos %1-ASL: %2 isTouchingGround: %3 Speed: %4",_vehicle, getPosASL _vehicle, isTouchingGround _vehicle, speed _vehicle);
if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then {
//display text saying there are no safe places to exit the vehicle
["displayTextStructured", [_unloader], [localize LSTRING(NoRoomToUnload)]] call FUNC(targetEvent);
["displayTextStructured", [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent;
};
false
};

View File

@ -32,4 +32,4 @@ private _speaker = _unit getVariable ["ACE_OriginalSpeaker", ""];
if (_speaker == "") exitWith {};
["setSpeaker", _unit, [_unit, _speaker]] call FUNC(targetEvent);
["setSpeaker", [_unit, _speaker], _unit] call CBA_fnc_targetEvent;

View File

@ -8,6 +8,6 @@ GVAR(deployPFH) = -1;
if (GVAR(deployPFH) != -1) then {
GVAR(placer) setVariable [QGVAR(wireDeployed), true];
};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call EFUNC(common,addEventHandler);
[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call CBA_fnc_addEventHandler;

View File

@ -34,4 +34,4 @@ if (_distance > 14 || {_distance < 2}) exitWith {}; // Fix if shooting wire
_vehicle = vehicle _killer;
[QGVAR(vehicleDamage), [_vehicle], [_wire, _vehicle]] call EFUNC(common,targetEvent);
[QGVAR(vehicleDamage), [_wire, _vehicle], [_vehicle]] call CBA_fnc_targetEvent;

View File

@ -30,4 +30,4 @@ GVAR(vectorConnected) = false;
GVAR(noVectorData) = true;
GVAR(vectorGrid) = "00000000";
["RangerfinderData", FUNC(handleRangeFinderData)] call EFUNC(common,addEventHandler);
["RangerfinderData", FUNC(handleRangeFinderData)] call CBA_fnc_addEventHandler;

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
["DisarmDropItems", FUNC(eventTargetStart)] call EFUNC(common,addEventHandler);
["DisarmDebugCallback", FUNC(eventCallerFinish)] call EFUNC(common,addEventHandler);
["DisarmDropItems", FUNC(eventTargetStart)] call CBA_fnc_addEventHandler;
["DisarmDebugCallback", FUNC(eventCallerFinish)] call CBA_fnc_addEventHandler;

View File

@ -23,5 +23,5 @@ params ["_caller", "_target", "_errorMsg"];
if (_errorMsg != "") then {
ACE_LOGINFO_2("%1 - eventTargetFinish: %2",ACE_time,_this);
["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent);
["DisarmDebugCallback", [_caller, _target, _errorMsg], [_caller]] call CBA_fnc_targetEvent;
};

View File

@ -42,7 +42,7 @@ GVAR(disarmTarget) = _target;
if (isNull GVAR(disarmTarget)) exitWith {ERROR("disarmTarget is null");};
TRACE_2("Debug: Droping %1 from %2",_data,GVAR(disarmTarget));
["DisarmDropItems", [GVAR(disarmTarget)], [ACE_player, GVAR(disarmTarget), [_data]]] call EFUNC(common,targetEvent);
["DisarmDropItems", [ACE_player, GVAR(disarmTarget), [_data]], [GVAR(disarmTarget)]] call CBA_fnc_targetEvent;
false //not sure what this does
}];

View File

@ -7,9 +7,9 @@ if (!hasInterface) exitWith {};
params ["_unit"];
[_unit] call FUNC(takeLoadedATWeapon);
[_unit] call FUNC(updateInventoryDisplay);
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
// Register fire event handler
// Only for the local player and for AI. Non-local players will handle it themselves
["firedPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler);
["firedNonPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler);
["firedPlayer", DFUNC(replaceATWeapon)] call CBA_fnc_addEventHandler;
["firedNonPlayer", DFUNC(replaceATWeapon)] call CBA_fnc_addEventHandler;

View File

@ -20,11 +20,11 @@ if (isNil "ACE_maxWeightCarry") then {
["isNotCarrying", {!((_this select 0) getVariable [QGVAR(isCarrying), false])}] call EFUNC(common,addCanInteractWithCondition);
// release object on player change. This does work when returning to lobby, but not when hard disconnecting.
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
["playerWeaponChanged", {_this call FUNC(handlePlayerWeaponChanged)}] call EFUNC(common,addEventhandler);
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
["playerWeaponChanged", {_this call FUNC(handlePlayerWeaponChanged)}] call CBA_fnc_addEventHandler;
// handle waking up dragged unit and falling unconscious while dragging
["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call EFUNC(common,addEventhandler);
["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
//@todo Captivity?

View File

@ -44,7 +44,7 @@ if (_target isKindOf "CAManBase") then {
_target attachTo [_unit, _position];
};
["setDir", _target, [_target, _direction]] call EFUNC(common,targetEvent);
["setDir", [_target, _direction], _target] call CBA_fnc_targetEvent;
_unit setVariable [QGVAR(isCarrying), true, true];
_unit setVariable [QGVAR(carriedObject), _target, true];

View File

@ -33,7 +33,7 @@ _position = _position vectorAdd [0, 0, _offset];
// attach object
TRACE_3("attaching",_position,_offset,_direction);
_target attachTo [_unit, _position];
["setDir", _target, [_target, _direction]] call EFUNC(common,targetEvent);
["setDir", [_target, _direction], _target] call CBA_fnc_targetEvent;
if (_target isKindOf "CAManBase") then {
[_target, "AinjPpneMrunSnonWnonDb_still", 0, true] call EFUNC(common,doAnimation);

View File

@ -30,8 +30,8 @@ if !(_unit getVariable ["ACE_isUnconscious", false]) then {
};
// prevent collision damage
["fixCollision", _unit] call EFUNC(common,localEvent);
["fixCollision", _target, _target] call EFUNC(common,targetEvent);
["fixCollision", _unit] call CBA_fnc_localEvent;
["fixCollision", _target, _target] call CBA_fnc_targetEvent;
// release object
detach _target;
@ -62,8 +62,8 @@ _unit setVariable [QGVAR(draggedObject), objNull, true];
[objNull, _target, true] call EFUNC(common,claim);
if !(_target isKindOf "CAManBase") then {
["fixPosition", _target, _target] call EFUNC(common,targetEvent);
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
["fixPosition", _target, _target] call CBA_fnc_targetEvent;
["fixFloating", _target, _target] call CBA_fnc_targetEvent;
};
if (_unit getVariable ["ACE_isUnconscious", false]) then {

View File

@ -25,8 +25,8 @@ TRACE_2("params",_unit,_target);
private _inBuilding = [_unit] call FUNC(isObjectOnObject);
// prevent collision damage
["fixCollision", _unit] call EFUNC(common,localEvent);
["fixCollision", _target, _target] call EFUNC(common,targetEvent);
["fixCollision", _unit] call CBA_fnc_localEvent;
["fixCollision", _target, _target] call CBA_fnc_targetEvent;
// release object
detach _target;
@ -67,8 +67,8 @@ _unit setVariable [QGVAR(carriedObject), objNull, true];
[objNull, _target, true] call EFUNC(common,claim);
if !(_target isKindOf "CAManBase") then {
["fixPosition", _target, _target] call EFUNC(common,targetEvent);
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
["fixPosition", _target, _target] call CBA_fnc_targetEvent;
["fixFloating", _target, _target] call CBA_fnc_targetEvent;
};
// recreate UAV crew

View File

@ -42,6 +42,6 @@ _carriedItem attachTo [_unit];
//reset the carry direction
private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
["setDir", _carriedItem, [_carriedItem, _direction]] call EFUNC(common,targetEvent);
["setDir", [_carriedItem, _direction], _carriedItem] call CBA_fnc_targetEvent;
true

View File

@ -16,7 +16,7 @@
#include "script_component.hpp"
//Event for setting explosive placement angle/pitch:
[QGVAR(place), {_this call FUNC(setPosition)}] call EFUNC(common,addEventHandler);
[QGVAR(place), {_this call FUNC(setPosition)}] 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)
@ -26,7 +26,7 @@ if (isServer) then {
if (!_isUnconscious) exitWith {};
TRACE_1("Knocked Out, Doing Deadman", _unit);
[_unit] call FUNC(onIncapacitated);
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
["clientRequestsOrientations", {
params ["_logic"];
@ -37,8 +37,8 @@ if (isServer) then {
(!isNull _explosive && {alive _explosive})
};
TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations));
["serverSendsOrientations", _logic, [GVAR(explosivesOrientations)]] call EFUNC(common,targetEvent);
}] call EFUNC(common,addEventHandler);
["serverSendsOrientations", [GVAR(explosivesOrientations)], _logic] call CBA_fnc_targetEvent;
}] call CBA_fnc_addEventHandler;
};
if (!hasInterface) exitWith {};
@ -61,12 +61,12 @@ if (didJIP) then {
} forEach _explosivesOrientations;
deleteVehicle GVAR(localLogic);
GVAR(localLogic) = nil;
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
// Create a logic to get the client ID
GVAR(localLogic) = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
TRACE_1("clientRequestsOrientations sent:",GVAR(localLogic));
["clientRequestsOrientations", [GVAR(localLogic)]] call EFUNC(common,serverEvent);
["clientRequestsOrientations", [GVAR(localLogic)]] call CBA_fnc_serverEvent;
};
["interactMenuOpened", {
@ -78,4 +78,4 @@ if (didJIP) then {
//Show defuse actions on CfgAmmos (allMines):
_this call FUNC(interactEH);
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;

View File

@ -22,8 +22,8 @@ TRACE_2("params",_unit,_explosive);
if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> QGVAR(explodeOnDefuseChance)))}) exitWith {
TRACE_1("exploding on defuse",_explosive);
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
[QGVAR(explodeOnDefuse), [_explosive, _unit]] call EFUNC(common,globalEvent);
[QGVAR(explodeOnDefuse), [_explosive, _unit]] call CBA_fnc_globalEvent;
};
_unit action ["Deactivate", _unit, _explosive];
[QGVAR(defuse), [_explosive, _unit]] call EFUNC(common,globalEvent);
[QGVAR(defuse), [_explosive, _unit]] call CBA_fnc_globalEvent;

View File

@ -95,6 +95,6 @@ if (isText(_triggerConfig >> "onPlace") && {[_unit,_explosive,_magazineClass,_tr
_pitch = getNumber (_magazineTrigger >> "pitch");
//Globaly set the position and angle:
[QGVAR(place), [_explosive, _dir, _pitch, _unit]] call EFUNC(common,globalEvent);
[QGVAR(place), [_explosive, _dir, _pitch, _unit]] call CBA_fnc_globalEvent;
_explosive

View File

@ -48,7 +48,7 @@ class CfgVehicles {
class ACE_deployRopes {
displayName = CSTRING(Interaction_deployRopes);
condition = QUOTE([ARR_2(_player, vehicle _player)] call FUNC(canDeployRopes));
statement = QUOTE([ARR_2(QUOTE(QGVAR(deployRopes)), [vehicle _player])] call EFUNC(common,serverEvent));
statement = QUOTE([ARR_2(QUOTE(QGVAR(deployRopes)), [vehicle _player])] call CBA_fnc_serverEvent);
showDisabled = 0;
priority = 1;
};

View File

@ -2,8 +2,8 @@
[QGVAR(deployRopes), {
_this call FUNC(deployRopes);
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
[QGVAR(startFastRope), {
[FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler;
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;

View File

@ -35,6 +35,6 @@ _deployedRopes set [_usableRopeIndex, _usableRope];
_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
//Start server PFH asap
[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex, false]] call EFUNC(common,serverEvent);
[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex, false]] call CBA_fnc_serverEvent;
moveOut _unit;
[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex, ACE_diagTime]] call CBA_fnc_addPerFrameHandler;

View File

@ -13,11 +13,11 @@ if (!hasInterface) exitWith {};
uiNamespace setVariable ["ACE_dlgRangefinder", _this select 0];
((_this select 0) displayCtrl 151) ctrlSetTextColor [0,0,0,0];
};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
// Register fire event handler
["firedPlayerVehicle", DFUNC(firedEH)] call EFUNC(common,addEventHandler);
["firedPlayerVehicleNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler);
["firedPlayerVehicle", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
["firedPlayerVehicleNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
// Register event for global updates
[QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call EFUNC(common,addEventHandler);
[QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call CBA_fnc_addEventHandler;

View File

@ -10,7 +10,7 @@ GVAR(pfeh_id) = -1;
//If not enabled, dont't bother adding keybind or eventhandler
if (!GVAR(enabled)) exitWith {};
[QGVAR(fingered), {_this call FUNC(incomingFinger)}] call EFUNC(common,addEventHandler);
[QGVAR(fingered), {_this call FUNC(incomingFinger)}] call CBA_fnc_addEventHandler;
["ACE3 Common",
QGVAR(finger),
@ -20,4 +20,4 @@ GVAR(pfeh_id) = -1;
},
{false},
[41, [true, false, false]], true] call CBA_fnc_addKeybind; // Shift + Tilda (hold)
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;

View File

@ -55,7 +55,7 @@ _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]);
TRACE_1("sending finger to",_sendFingerToPlayers);
[QGVAR(fingered), _sendFingerToPlayers, [ACE_player, _fingerPosPrecise]] call EFUNC(common,targetEvent);
[QGVAR(fingered), [ACE_player, _fingerPosPrecise], _sendFingerToPlayers] call CBA_fnc_targetEvent;
ACE_player playActionNow "GestureGo";

View File

@ -6,7 +6,7 @@ if(GVAR(EnableDebugTrace) && !isMultiplayer) then {
};
if(isServer) then {
[QGVAR(frag_eh), { _this call FUNC(frago); }] call EFUNC(common,addEventHandler);
[QGVAR(frag_eh), { _this call FUNC(frago); }] call CBA_fnc_addEventHandler;
};
["SettingsInitialized", {
@ -14,16 +14,16 @@ if(isServer) then {
if (!GVAR(enabled)) exitWith {};
// Register fire event handler
["firedPlayer", DFUNC(fired)] call EFUNC(common,addEventHandler);
["firedPlayerNonLocal", DFUNC(fired)] call EFUNC(common,addEventHandler);
["firedNonPlayer", DFUNC(fired)] call EFUNC(common,addEventHandler);
["firedPlayerVehicle", DFUNC(fired)] call EFUNC(common,addEventHandler);
["firedPlayerVehicleNonLocal", DFUNC(fired)] call EFUNC(common,addEventHandler);
["firedNonPlayerVehicle", DFUNC(fired)] call EFUNC(common,addEventHandler);
["firedPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
["firedPlayerNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
["firedNonPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
["firedPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
["firedPlayerVehicleNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
["firedNonPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
[FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler;
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
//Cache for ammo type configs
GVAR(cacheRoundsTypesToTrack) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0];

View File

@ -22,7 +22,7 @@ if (!alive _round) exitWith {
if((diag_frameno - _firedFrame) > 1) then { //skip if deleted within a single frame
if(_skip == 0) then {
if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then {
[QGVAR(frag_eh), _this] call EFUNC(common,serverEvent);
[QGVAR(frag_eh), _this] call CBA_fnc_serverEvent;
};
};
};

View File

@ -35,5 +35,5 @@ GVAR(pfID) = -1;
GVAR(pfID) = -1;
};
};
}] call EFUNC(common,addEventHandler);
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler;

View File

@ -50,10 +50,10 @@ GVAR(OldGlasses) = "<null>";
private _currentGlasses = goggles _unit;
if (GVAR(OldGlasses) != _currentGlasses) then {
["GlassesChanged", [_unit, _currentGlasses]] call EFUNC(common,localEvent);
["GlassesChanged", [_unit, _currentGlasses]] call CBA_fnc_localEvent;
GVAR(OldGlasses) = _currentGlasses;
};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
// add glasses eventhandlers
["GlassesChanged", {
@ -68,7 +68,7 @@ GVAR(OldGlasses) = "<null>";
} else {
call FUNC(removeGlassesEffect);
};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
["GlassesCracked", {
params ["_unit"];
@ -94,7 +94,7 @@ GVAR(OldGlasses) = "<null>";
}, _unit, 25] call EFUNC(common,waitAndExecute);
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
// check goggles
private _fnc_checkGoggles = {
@ -111,8 +111,8 @@ private _fnc_checkGoggles = {
};
};
["cameraViewChanged", _fnc_checkGoggles] call EFUNC(common,addEventHandler);
["activeCameraChanged", _fnc_checkGoggles] call EFUNC(common,addEventHandler);
["cameraViewChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler;
["activeCameraChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler;
// goggles effects main PFH
[{
@ -135,4 +135,4 @@ private _fnc_checkGoggles = {
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
// Register fire event handler
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
["firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;

View File

@ -27,7 +27,7 @@ _config = configFile >> "CfgGlasses" >> goggles _unit;
if ((_this select 1) call FUNC(GetExplosionIndex) < getNumber (_config >> "ACE_Resistance")) exitWith {true};
if !([_unit] call FUNC(isGogglesVisible)) exitWith {
["GlassesCracked", [_unit]] call EFUNC(common,localEvent);
["GlassesCracked", [_unit]] call CBA_fnc_localEvent;
true
};
@ -46,5 +46,5 @@ if (getText (_config >> "ACE_OverlayCracked") != "") then {
(GLASSDISPLAY displayCtrl 10650) ctrlSetText getText (_config >> "ACE_OverlayCracked");
};
["GlassesCracked", [_unit]] call EFUNC(common,localEvent);
["GlassesCracked", [_unit]] call CBA_fnc_localEvent;
true

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
["flashbangExplosion", {_this call FUNC(flashbangExplosionEH)}] call EFUNC(common,addEventHandler);
["flashbangExplosion", {_this call FUNC(flashbangExplosionEH)}] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {};
@ -25,6 +25,6 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
// Register fire event handler
["firedPlayer", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler);
["firedPlayerNonLocal", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler);
["firedNonPlayer", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler);
["firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
["firedPlayerNonLocal", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
["firedNonPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;

View File

@ -21,5 +21,5 @@ TRACE_1("params",_projectile);
if (alive _projectile) then {
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
["flashbangExplosion", [getPosASL _projectile]] call EFUNC(common,globalEvent);
["flashbangExplosion", [getPosASL _projectile]] call CBA_fnc_globalEvent;
};

View File

@ -28,8 +28,8 @@ GVAR(volumeAttenuation) = 1;
[FUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler;
// Update veh attunation when player veh changes
["playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler);
["playerTurretChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler);
["playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call CBA_fnc_addEventHandler;
["playerTurretChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call CBA_fnc_addEventHandler;
// Reset deafness on respawn (or remote control player switch)
["playerChanged", {
@ -38,8 +38,8 @@ GVAR(volumeAttenuation) = 1;
ACE_player setVariable [QGVAR(deaf), false];
GVAR(time3) = 0;
[] call FUNC(updateHearingProtection);
}] call EFUNC(common,addEventhandler);
}] call CBA_fnc_addEventHandler;
// Update protection on possible helmet change
["playerInventoryChanged", {[] call FUNC(updateHearingProtection);}] call EFUNC(common,addEventhandler);
}] call EFUNC(common,addEventHandler);
["playerInventoryChanged", {[] call FUNC(updateHearingProtection);}] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler;

View File

@ -10,5 +10,5 @@ GVAR(ELEVAT) = 0.01;
// Register fire event handler
// Don't run for non players, as they are too dumb to launch huntirs anyway
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
["firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
["firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;

View File

@ -13,17 +13,17 @@ GVAR(ParsedTextCached) = [];
if (({_x == _name} count [QGVAR(colorTextMax), QGVAR(colorTextMin), QGVAR(colorShadowMax), QGVAR(colorShadowMin), QGVAR(textSize), QGVAR(shadowSetting)]) == 1) then {
[] call FUNC(setupTextColors);
};
}] call EFUNC(common,addEventhandler);
}] call CBA_fnc_addEventHandler;
["SettingsInitialized", {
//Setup text/shadow/size/color settings matrix
[] call FUNC(setupTextColors);
// Install the render EH on the main display
addMissionEventHandler ["Draw3D", DFUNC(render)];
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
//Add Actions to Houses:
["interactMenuOpened", {_this call FUNC(userActions_addHouseActions)}] call EFUNC(common,addEventHandler);
["interactMenuOpened", {_this call FUNC(userActions_addHouseActions)}] call CBA_fnc_addEventHandler;
["ACE3 Common", QGVAR(InteractKey), (localize LSTRING(InteractKey)),
{
@ -51,17 +51,17 @@ GVAR(ParsedTextCached) = [];
GVAR(actionSelected) = false;
[GVAR(openedMenuType), false] call FUNC(keyUp);
}] call EFUNC(common,addEventhandler);
}] call CBA_fnc_addEventHandler;
// disable firing while the interact menu is is is opened
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventHandler);
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
// background options
["interactMenuOpened", {
if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), true] call EFUNC(common,blurScreen);};
if (GVAR(menuBackground)==2) then {0 cutRsc[QGVAR(menuBackground), "PLAIN", 1, false];};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
["interactMenuClosed", {
if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), false] call EFUNC(common,blurScreen);};
if (GVAR(menuBackground)==2) then {(uiNamespace getVariable [QGVAR(menuBackground), displayNull]) closeDisplay 0;};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;

View File

@ -102,6 +102,6 @@ if (GVAR(openedMenuType) == 0) then {
GVAR(startHoverTime) = -1000;
};
["interactMenuOpened", [_menuType]] call EFUNC(common,localEvent);
["interactMenuOpened", [_menuType]] call CBA_fnc_localEvent;
true

View File

@ -28,7 +28,7 @@ if(GVAR(actionSelected)) then {
private _target = GVAR(selectedTarget);
// Clear the conditions caches
["clearConditionCaches", []] call EFUNC(common,localEvent);
["clearConditionCaches", []] call CBA_fnc_localEvent;
// exit scope if selecting an action on key release is disabled
if (!(GVAR(actionOnKeyRelease)) && !_calledByClicking) exitWith {};
@ -40,11 +40,11 @@ if(GVAR(actionSelected)) then {
[_target, _player, _actionData select 6] call (_actionData select 3);
// Clear the conditions caches again if the action was performed
["clearConditionCaches", []] call EFUNC(common,localEvent);
["clearConditionCaches", []] call CBA_fnc_localEvent;
};
};
["interactMenuClosed", [GVAR(openedMenuType)]] call EFUNC(common,localEvent);
["interactMenuClosed", [GVAR(openedMenuType)]] call CBA_fnc_localEvent;
GVAR(keyDown) = false;
GVAR(keyDownSelfAction) = false;

View File

@ -97,7 +97,7 @@ if (GVAR(openedMenuType) >= 0) then {
private _target = GVAR(selectedTarget);
// Clear the conditions caches
["clearConditionCaches", []] call EFUNC(common,localEvent);
["clearConditionCaches", []] call CBA_fnc_localEvent;
// Check the action conditions
private _actionData = GVAR(selectedAction) select 0;
@ -106,7 +106,7 @@ if (GVAR(openedMenuType) >= 0) then {
[_target, _player, _actionData select 6] call (_actionData select 3);
// Clear the conditions caches again if the action was performed
["clearConditionCaches", []] call EFUNC(common,localEvent);
["clearConditionCaches", []] call CBA_fnc_localEvent;
};
};
};

View File

@ -3,30 +3,30 @@
ACE_Modifier = 0;
["pardon", {(_this select 0) addRating -rating (_this select 0)}] call EFUNC(common,addEventHandler);
["pardon", {(_this select 0) addRating -rating (_this select 0)}] call CBA_fnc_addEventHandler;
["getDown", {
params ["_target"];
_target setUnitPos "DOWN";
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
["sendAway", {
params ["_unit", "_position"];
_unit setUnitPos "AUTO";
_unit doMove _position;
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
["lampTurnOn", {
params ["_lamp", "_hitPointsDamage", "_disabledLampDMG"];
{if((_x select 1) == _disabledLampDMG) then {_lamp setHit [_x select 0, 0];};nil} count _hitPointsDamage;
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
["lampTurnOff", {
params ["_lamp", "_hitPointsDamage", "_disabledLampDMG"];
{_lamp setHit [_x select 0, (_x select 1) max _disabledLampDMG];nil} count _hitPointsDamage;
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {};
@ -40,7 +40,7 @@ GVAR(isOpeningDoor) = false;
private _message = parseText format ([["%1 &gt;", localize LSTRING(YouWereTappedRight)], ["&lt; %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 1));
[_message] call EFUNC(common,displayTextStructured);
};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
// add keybinds
["ACE3 Common", QGVAR(openDoor), localize LSTRING(OpenDoor), {

View File

@ -17,4 +17,4 @@
params ["_unit"];
["selectLeader", units group _unit, [group _unit, _unit]] call EFUNC(common,targetEvent);
["selectLeader", [group _unit, _unit], units group _unit] call CBA_fnc_targetEvent;

View File

@ -27,7 +27,7 @@ _chance = [0.5, 0.8] select (count weapons _unit > 0);
{
if (count weapons _x == 0 && {random 1 < _chance}) then {
["getDown", [_x], [_x]] call EFUNC(common,targetEvent);
["getDown", [_x], [_x]] call CBA_fnc_targetEvent;
};
false
} count (_target nearEntities ["Civilian", SEND_RADIUS]);

View File

@ -31,5 +31,5 @@ if (_unit == ACE_player) then {
_message = format [localize LSTRING(JoinedTeam), _team];
};
["displayTextStructured", _message] call EFUNC(common,localEvent);
["displayTextStructured", _message] call CBA_fnc_localEvent;
};

View File

@ -15,4 +15,4 @@
params ["", "_target"];
["pardon", [_target], [_target]] call EFUNC(common,targetEvent);
["pardon", [_target], [_target]] call CBA_fnc_targetEvent;

View File

@ -51,4 +51,4 @@ _target addMagazine [_magToPassClassName, _magToPassAmmoCount];
_playerName = [_player] call EFUNC(common,getName);
_magToPassDisplayName = getText (configFile >> "CfgMagazines" >> _magToPassClassName >> "displayName");
["displayTextStructured", [_target], [[LSTRING(PassMagazineHint), _playerName, _magToPassDisplayName], 1.5, _target]] call EFUNC(common,targetEvent);
["displayTextStructured", [[LSTRING(PassMagazineHint), _playerName, _magToPassDisplayName], 1.5, _target], [_target]] call CBA_fnc_targetEvent;

View File

@ -22,4 +22,4 @@ private _newVelocity = vectorDir _unit;
_newVelocity set [2, 0.25];
_newVelocity = _newVelocity vectorMultiply 2;
["setVelocity", [_boat], [_boat, _newVelocity]] call EFUNC(common,targetEvent);
["setVelocity", [_boat, _newVelocity], [_boat]] call CBA_fnc_targetEvent;

View File

@ -31,7 +31,7 @@ _chance = [0.5, 0.8] select (count weapons _unit > 0);
_position = getPosASL _unit vectorAdd (eyeDirection _unit vectorMultiply SEND_DISTANCE);
_position set [2, 0];
["sendAway", [_x], [_x, _position]] call EFUNC(common,targetEvent);
["sendAway", [_x, _position], [_x]] call CBA_fnc_targetEvent;
};
false
} count (_unit nearEntities ["Civilian", SEND_RADIUS]);

View File

@ -31,8 +31,8 @@ private _hitPointsDamage = [];
//if lamp is on turn it off
private _eventName = ["lampTurnOn", "lampTurnOff"] select _isOn;
if(local _lamp) then {
[_eventName, [_lamp, _hitPointsDamage, DISABLED_LAMP_DMG]] call EFUNC(common,localEvent);
[_eventName, [_lamp, _hitPointsDamage, DISABLED_LAMP_DMG]] call CBA_fnc_localEvent;
} else {
[_eventName, [_lamp], [_lamp, _hitPointsDamage, DISABLED_LAMP_DMG]] call EFUNC(common,targetEvent);
[_eventName, [_lamp, _hitPointsDamage, DISABLED_LAMP_DMG], [_lamp]] call CBA_fnc_targetEvent;
};
_lamp setVariable ["ACE_lampOn", !_isOn, true];

View File

@ -25,4 +25,4 @@ if (_unit == ACE_player) then {
_unit playActionNow "PutDown";
["tapShoulder", [_target], [_target, _shoulderNum]] call EFUNC(common,targetEvent);
["tapShoulder", [_target, _shoulderNum], [_target]] call CBA_fnc_targetEvent;

View File

@ -2,6 +2,6 @@
#include "initKeybinds.sqf"
["laser_laserOn", {_this call DFUNC(handleLaserOn)}] call EFUNC(common,addEventHandler);
["laser_laserOff", {_this call DFUNC(handleLaserOff)}] call EFUNC(common,addEventHandler);
["laser_laserOn", {_this call DFUNC(handleLaserOn)}] call CBA_fnc_addEventHandler;
["laser_laserOff", {_this call DFUNC(handleLaserOff)}] call CBA_fnc_addEventHandler;

View File

@ -13,4 +13,4 @@
private ["_uuid"];
_uuid = _this select 0;
["laser_laserOff", [_uuid]] call EFUNC(common,globalEvent);
["laser_laserOff", [_uuid]] call CBA_fnc_globalEvent;

View File

@ -19,5 +19,5 @@
private ["_uuid", "_args"];
_uuid = format["%1%2%3", floor ACE_diagTime, floor random 1000, floor random 10000];
_args = [_uuid, _this];
["laser_laserOn", _args] call EFUNC(common,globalEvent);
["laser_laserOn", _args] call CBA_fnc_globalEvent;
_uuid;

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
// fixes laser when being captured. Needed, because the selectionPosition of the right hand is used
["SetHandcuffed", {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call EFUNC(common,addEventHandler);
["SetHandcuffed", {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {};
@ -32,4 +32,4 @@ GVAR(nearUnits) = [];
addMissionEventHandler ["Draw3D", {
call FUNC(onDraw);
}];
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;

View File

@ -24,7 +24,7 @@ _onFinish = {
(_this select 0) params ["_caller", "_target"];
_caller removeItem "ACE_UAVBattery";
playSound3D [QUOTE(PATHTO_R(sounds\exchange_battery.ogg)), objNull, false, getPosASL _caller, 1, 1, 10];
["setFuel", [_target], [_target, 1]] call EFUNC(common,targetEvent); //setFuel is local
["setFuel", [_target, 1], [_target]] call CBA_fnc_targetEvent; //setFuel is local
};
_onFailure = {

View File

@ -2,4 +2,4 @@
if (!hasInterface) exitWith {};
["interactMenuOpened", {_this call FUNC(interactEH)}] call EFUNC(common,addEventHandler);
["interactMenuOpened", {_this call FUNC(interactEH)}] call CBA_fnc_addEventHandler;

Some files were not shown because too many files have changed in this diff Show More