mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
QGVAR and fix events in concertina_wire, disarming and explosives
This commit is contained in:
parent
dd2e9140ae
commit
99675417c6
@ -13,6 +13,7 @@ class CfgPatches {
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
interactMenuOpened = "ace_interactMenuOpened";
|
||||
};
|
@ -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;
|
||||
|
@ -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);
|
||||
};
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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
|
||||
}];
|
||||
|
@ -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;
|
||||
|
@ -45,6 +45,6 @@ class CfgMineTriggers {
|
||||
|
||||
class ACE_newEvents {
|
||||
medical_onUnconscious = "ace_medical_onUnconscious";
|
||||
clientRequestsOrientations = "ace_clientRequestsOrientations";
|
||||
serverSendsOrientations = "ace_serverSendsOrientations";
|
||||
clientRequestsOrientations = QGVAR(clientRequestOrientations);
|
||||
serverSendsOrientations = QGVAR(serverSendOrientations);
|
||||
};
|
Loading…
Reference in New Issue
Block a user