From 99675417c698bbf1804dabb11ebf3eeb96c27359 Mon Sep 17 00:00:00 2001 From: jonpas Date: Wed, 25 May 2016 01:51:58 +0200 Subject: [PATCH] QGVAR and fix events in concertina_wire, disarming and explosives --- addons/concertina_wire/config.cpp | 3 ++- addons/disarming/XEH_postInit.sqf | 4 ++-- addons/disarming/config.cpp | 4 ++-- addons/disarming/functions/fnc_eventTargetFinish.sqf | 2 +- addons/disarming/functions/fnc_openDisarmDialog.sqf | 2 +- addons/explosives/XEH_postInit.sqf | 10 +++++----- addons/explosives/config.cpp | 6 +++--- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/addons/concertina_wire/config.cpp b/addons/concertina_wire/config.cpp index 6404b1018e..68bb4816db 100644 --- a/addons/concertina_wire/config.cpp +++ b/addons/concertina_wire/config.cpp @@ -13,6 +13,7 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" + class ACE_newEvents { interactMenuOpened = "ace_interactMenuOpened"; -}; \ No newline at end of file +}; diff --git a/addons/disarming/XEH_postInit.sqf b/addons/disarming/XEH_postInit.sqf index 92a2c10148..6944f8b146 100644 --- a/addons/disarming/XEH_postInit.sqf +++ b/addons/disarming/XEH_postInit.sqf @@ -1,4 +1,4 @@ #include "script_component.hpp" -["ace_disarmDropItems", FUNC(eventTargetStart)] call CBA_fnc_addEventHandler; -["ace_disarmDebugCallback", FUNC(eventCallerFinish)] call CBA_fnc_addEventHandler; +[QGVAR(dropItems), FUNC(eventTargetStart)] call CBA_fnc_addEventHandler; +[QGVAR(debugCallback), FUNC(eventCallerFinish)] call CBA_fnc_addEventHandler; diff --git a/addons/disarming/config.cpp b/addons/disarming/config.cpp index b7868726ed..39a536e1b2 100644 --- a/addons/disarming/config.cpp +++ b/addons/disarming/config.cpp @@ -19,6 +19,6 @@ class CfgPatches { #include "gui_disarm.hpp" class ACE_newEvents { - DisarmDebugCallback = "ace_disarmDebugCallback"; - DisarmDropItems = "ace_disarmDropItems"; + DisarmDebugCallback = QGVAR(debugCallback); + DisarmDropItems = QGVAR(dropItems); }; diff --git a/addons/disarming/functions/fnc_eventTargetFinish.sqf b/addons/disarming/functions/fnc_eventTargetFinish.sqf index 1bd1ffa342..42580d81f3 100644 --- a/addons/disarming/functions/fnc_eventTargetFinish.sqf +++ b/addons/disarming/functions/fnc_eventTargetFinish.sqf @@ -23,5 +23,5 @@ params ["_caller", "_target", "_errorMsg"]; if (_errorMsg != "") then { ACE_LOGINFO_2("%1 - eventTargetFinish: %2",ACE_time,_this); - ["ace_disarmDebugCallback", [_caller, _target, _errorMsg], [_caller]] call CBA_fnc_targetEvent; + [QGVAR(debugCallback), [_caller, _target, _errorMsg], [_caller]] call CBA_fnc_targetEvent; }; diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index ea0de8942a..0883fde2dd 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -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)); - ["ace_disarmDropItems", [ACE_player, GVAR(disarmTarget), [_data]], [GVAR(disarmTarget)]] call CBA_fnc_targetEvent; + [QGVAR(dropItems), [ACE_player, GVAR(disarmTarget), [_data]], [GVAR(disarmTarget)]] call CBA_fnc_targetEvent; false //not sure what this does }]; diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index 8b08ffd804..27a1371447 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -28,7 +28,7 @@ if (isServer) then { [_unit] call FUNC(onIncapacitated); }] call CBA_fnc_addEventHandler; - ["clientRequestsOrientations", { + [QGVAR(clientRequestOrientations), { params ["_logic"]; TRACE_1("clientRequestsOrientations received:",_logic); // Filter the array before sending it @@ -37,7 +37,7 @@ if (isServer) then { (!isNull _explosive && {alive _explosive}) }; TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations)); - ["ace_serverSendsOrientations", [GVAR(explosivesOrientations)], _logic] call CBA_fnc_targetEvent; + [QGVAR(serverSendOrientations), [GVAR(explosivesOrientations)], _logic] call CBA_fnc_targetEvent; }] call CBA_fnc_addEventHandler; }; @@ -51,7 +51,7 @@ GVAR(CurrentSpeedDial) = 0; // In case we are a JIP client, ask the server for orientation of any previously // placed mine. if (didJIP) then { - ["serverSendsOrientations", { + [QGVAR(serverSendOrientations), { params ["_explosivesOrientations"]; TRACE_1("serverSendsOrientations received:",_explosivesOrientations); { @@ -66,10 +66,10 @@ if (didJIP) then { // 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)); - ["ace_clientRequestsOrientations", [GVAR(localLogic)]] call CBA_fnc_serverEvent; + [QGVAR(clientRequestOrientations), [GVAR(localLogic)]] call CBA_fnc_serverEvent; }; -["interactMenuOpened", { +["ace_interactMenuOpened", { //Cancel placement if interact menu opened if (GVAR(pfeh_running)) then { GVAR(placeAction) = PLACE_CANCEL; diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index 8b5b91007b..6dc7d95719 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -45,6 +45,6 @@ class CfgMineTriggers { class ACE_newEvents { medical_onUnconscious = "ace_medical_onUnconscious"; - clientRequestsOrientations = "ace_clientRequestsOrientations"; - serverSendsOrientations = "ace_serverSendsOrientations"; -}; \ No newline at end of file + clientRequestsOrientations = QGVAR(clientRequestOrientations); + serverSendsOrientations = QGVAR(serverSendOrientations); +};