mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of https://github.com/KoffeinFlummi/ACE3 into optics
This commit is contained in:
@ -7,7 +7,6 @@ private ["_eventType", "_event", "_eventName", "_eventArgs", "_eventNames", "_ev
|
||||
_eventType = _this select 0;
|
||||
_event = _this select 1;
|
||||
|
||||
|
||||
if(_eventType == "ACEg") then {
|
||||
_eventName = _event select 0;
|
||||
_eventArgs = _event select 1;
|
||||
@ -16,9 +15,18 @@ if(_eventType == "ACEg") then {
|
||||
_eventIndex = _eventNames find _eventName;
|
||||
if(_eventIndex != -1) then {
|
||||
_events = (GVAR(events) select 1) select _eventIndex;
|
||||
|
||||
#ifdef DEBUG_EVENTS
|
||||
diag_log text format[ARR_2("* Net Event %1",_eventName)];
|
||||
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||
#endif
|
||||
|
||||
{
|
||||
if(!isNil "_x") then {
|
||||
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Net Event %1 ID: %2",_eventName,_forEachIndex)]);
|
||||
#ifdef DEBUG_EVENTS_CALLSTACK
|
||||
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
|
||||
#endif
|
||||
};
|
||||
} forEach _events;
|
||||
};
|
||||
|
@ -2,16 +2,16 @@
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
/*
|
||||
|
||||
diag_log text format["REGISTERED ACE PFH HANDLERS"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
if(!isNil "ACE_PFH") then {
|
||||
if(!isNil "ACE_PFH_COUNTER") then {
|
||||
{
|
||||
private["_pfh"];
|
||||
_pfh = _x select 0;
|
||||
diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ];
|
||||
} forEach ACE_PFH;
|
||||
};*/
|
||||
} forEach ACE_PFH_COUNTER;
|
||||
};
|
||||
|
||||
diag_log text format["ACE COUNTER RESULTS"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
|
@ -19,9 +19,17 @@ _eventNames = GVAR(events) select 0;
|
||||
_eventIndex = _eventNames find _eventName;
|
||||
if(_eventIndex != -1) then {
|
||||
_events = (GVAR(events) select 1) select _eventIndex;
|
||||
#ifdef DEBUG_EVENTS
|
||||
diag_log text format[ARR_2("* Local Event: %1",_eventName)];
|
||||
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||
#endif
|
||||
|
||||
{
|
||||
if(!isNil "_x") then {
|
||||
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Local Event %1 ID: %2",_eventName,_forEachIndex)]);
|
||||
#ifdef DEBUG_EVENTS_CALLSTACK
|
||||
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
|
||||
#endif
|
||||
};
|
||||
} forEach _events;
|
||||
};
|
@ -16,6 +16,10 @@ private ["_eventName", "_eventArgs"];
|
||||
_eventName = _this select 0;
|
||||
_eventArgs = _this select 1;
|
||||
|
||||
#ifdef DEBUG_EVENTS
|
||||
diag_log text format[ARR_2("* Server Event: %1",_eventName)];
|
||||
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||
#endif
|
||||
|
||||
ACEg = [_eventName, _eventArgs];
|
||||
if(!isServer) then {
|
||||
|
@ -21,6 +21,11 @@ _eventName = _this select 0;
|
||||
_eventTargets = _this select 1;
|
||||
_eventArgs = _this select 2;
|
||||
|
||||
#ifdef DEBUG_EVENTS
|
||||
diag_log text format[ARR_3("* Target Event: %1 - %2",_eventName,_eventTargets)];
|
||||
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||
#endif
|
||||
|
||||
ACEc = [_eventName, _eventTargets, _eventArgs];
|
||||
if(!isServer) then {
|
||||
publicVariableServer "ACEc";
|
||||
|
Reference in New Issue
Block a user