aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/clientruihooks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/clientruihooks.cpp')
-rw-r--r--NorthstarDLL/clientruihooks.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/NorthstarDLL/clientruihooks.cpp b/NorthstarDLL/clientruihooks.cpp
new file mode 100644
index 00000000..5fb0b348
--- /dev/null
+++ b/NorthstarDLL/clientruihooks.cpp
@@ -0,0 +1,22 @@
+#include "pch.h"
+#include "convar.h"
+
+AUTOHOOK_INIT()
+
+ConVar* Cvar_rui_drawEnable;
+
+AUTOHOOK(DrawRUIFunc, engine.dll + 0xFC500,
+bool,, (void* a1, float* a2),
+{
+ if (!Cvar_rui_drawEnable->GetBool())
+ return 0;
+
+ return DrawRUIFunc(a1, a2);
+})
+
+ON_DLL_LOAD_CLIENT_RELIESON("engine.dll", RUI, ConVar, [](HMODULE baseAddress)
+{
+ AUTOHOOK_DISPATCH()
+
+ Cvar_rui_drawEnable = new ConVar("rui_drawEnable", "1", FCVAR_CLIENTDLL, "Controls whether RUI should be drawn");
+}) \ No newline at end of file