From 319ea9b32a4a86a26afec18ef2cb8f2387a68606 Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Fri, 16 May 2025 01:11:22 -0300 Subject: [PATCH] added XEH_postInit to start websocket on client side --- addons/client/CfgEventHandlers.hpp | 8 +++++++- addons/client/XEH_PREP.hpp | 1 - .../{functions/fnc_socketRouter.sqf => XEH_postInit.sqf} | 2 +- addons/client/config.cpp | 6 ------ 4 files changed, 8 insertions(+), 9 deletions(-) rename addons/client/{functions/fnc_socketRouter.sqf => XEH_postInit.sqf} (89%) diff --git a/addons/client/CfgEventHandlers.hpp b/addons/client/CfgEventHandlers.hpp index 6446b64..2ea4297 100644 --- a/addons/client/CfgEventHandlers.hpp +++ b/addons/client/CfgEventHandlers.hpp @@ -8,4 +8,10 @@ class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; -}; \ No newline at end of file +}; + +class Extended_PostInit_EventHandlers { + class armatak_main { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/client/XEH_PREP.hpp b/addons/client/XEH_PREP.hpp index da6f3c4..6888b1d 100644 --- a/addons/client/XEH_PREP.hpp +++ b/addons/client/XEH_PREP.hpp @@ -1,3 +1,2 @@ PREP(convertClientLocation); PREP(extractClientPosition); -PREP(socketRouter); \ No newline at end of file diff --git a/addons/client/functions/fnc_socketRouter.sqf b/addons/client/XEH_postInit.sqf similarity index 89% rename from addons/client/functions/fnc_socketRouter.sqf rename to addons/client/XEH_postInit.sqf index 018a384..56d01f8 100644 --- a/addons/client/functions/fnc_socketRouter.sqf +++ b/addons/client/XEH_postInit.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" if (!hasInterface) exitWith {}; diff --git a/addons/client/config.cpp b/addons/client/config.cpp index 07438e6..af4af6c 100644 --- a/addons/client/config.cpp +++ b/addons/client/config.cpp @@ -16,10 +16,4 @@ class CfgPatches { }; }; -class Extended_PostInit_EventHandlers { - class armatak_main { - init = "call compileScript ['\armatak\armatak\armatak_client\initPlayerLocal.sqf']"; - }; -}; - #include "CfgEventHandlers.hpp" \ No newline at end of file