From 51420eca64bbf2454f048e5e8296a7de28c65735 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 14 Aug 2024 17:42:07 +0200 Subject: [PATCH] Attempt to hijack RscDisplayEGSpectator function --- addons/spectator/CfgScriptPaths.hpp | 4 ++++ addons/spectator/RscDisplayEGSpectator.hpp | 5 +++++ addons/spectator/XEH_PREP.hpp | 1 + addons/spectator/config.cpp | 2 ++ 4 files changed, 12 insertions(+) create mode 100644 addons/spectator/CfgScriptPaths.hpp create mode 100644 addons/spectator/RscDisplayEGSpectator.hpp diff --git a/addons/spectator/CfgScriptPaths.hpp b/addons/spectator/CfgScriptPaths.hpp new file mode 100644 index 0000000..5b4211f --- /dev/null +++ b/addons/spectator/CfgScriptPaths.hpp @@ -0,0 +1,4 @@ +class CfgScriptPaths +{ + AFModsSpectatorGUI = QPATHTOF(functions\); +}; diff --git a/addons/spectator/RscDisplayEGSpectator.hpp b/addons/spectator/RscDisplayEGSpectator.hpp new file mode 100644 index 0000000..e91f9c1 --- /dev/null +++ b/addons/spectator/RscDisplayEGSpectator.hpp @@ -0,0 +1,5 @@ +class RscDisplayEGSpectator +{ + scriptName = "fnc_rscDisplayEGSpectator"; + scriptPath = "AFModsSpectatorGUI"; +}; diff --git a/addons/spectator/XEH_PREP.hpp b/addons/spectator/XEH_PREP.hpp index f22e5d3..a5abd1a 100644 --- a/addons/spectator/XEH_PREP.hpp +++ b/addons/spectator/XEH_PREP.hpp @@ -4,6 +4,7 @@ PREP(EGSpectator); // This duplicated as BIS_fnc_EGSpectator in CfgFunctions so PREP(enable); PREP(reloadLocal); PREP(restart); +PREP(rscDisplayEGSpectator); PREP(start); PREP(stop); PREP(toggle); diff --git a/addons/spectator/config.cpp b/addons/spectator/config.cpp index d62f251..a0c4840 100644 --- a/addons/spectator/config.cpp +++ b/addons/spectator/config.cpp @@ -18,3 +18,5 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgFunctions.hpp" +#include "CfgScriptPaths.hpp" +#include "RscDisplayEGSpectator.hpp"