aboutsummaryrefslogtreecommitdiff
path: root/source2-basehook/Hooks/LevelInit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source2-basehook/Hooks/LevelInit.cpp')
-rw-r--r--source2-basehook/Hooks/LevelInit.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/source2-basehook/Hooks/LevelInit.cpp b/source2-basehook/Hooks/LevelInit.cpp
new file mode 100644
index 0000000..e07b3b6
--- /dev/null
+++ b/source2-basehook/Hooks/LevelInit.cpp
@@ -0,0 +1,13 @@
+#include "LevelInit.hpp"
+
+oLevelInit OriginalLevelInit;
+void __fastcall hkLevelInit(IClientModeShared* thisptr, const char* newmap)
+{
+ pGlobals = *(CGlobalVarsBase**)Utilities::Dereference(Sig("client.dll", "48 89 0D ? ? ? ? 48 83 C4 28"), 3);
+ Msg(Color(255, 0, 0, 255), "NewMap %s \n", newmap);
+ Msg(Color(255, 0, 0, 255), "pGlobals %p \n", pGlobals);
+ Msg(Color(255, 0, 0, 255), "pGlobals->MaxClients %i \n", pGlobals->maxclients);
+
+ OriginalLevelInit(thisptr, newmap);
+}
+