aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/shared
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/shared')
-rw-r--r--NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp b/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp
index 2a0a9c2c..8821a40d 100644
--- a/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp
+++ b/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp
@@ -5,6 +5,7 @@
#include "engine/r2engine.h"
#include "client/r2client.h"
#include "core/math/vector.h"
+#include "core/vanilla.h"
AUTOHOOK_INIT()
@@ -33,6 +34,8 @@ AUTOHOOK(CLC_Screenshot_WriteToBuffer, engine.dll + 0x22AF20,
bool, __fastcall, (void* thisptr, void* buffer)) // 48 89 5C 24 ? 57 48 83 EC 20 8B 42 10
// clang-format on
{
+ if (g_pVanillaCompatibility->GetVanillaCompatibility())
+ return CLC_Screenshot_WriteToBuffer(thisptr, buffer);
return false;
}
@@ -41,6 +44,8 @@ AUTOHOOK(CLC_Screenshot_ReadFromBuffer, engine.dll + 0x221F00,
bool, __fastcall, (void* thisptr, void* buffer)) // 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B DA 48 8B 52 38
// clang-format on
{
+ if (g_pVanillaCompatibility->GetVanillaCompatibility())
+ return CLC_Screenshot_ReadFromBuffer(thisptr, buffer);
return false;
}
@@ -261,6 +266,9 @@ bool, __fastcall, (const char* pModName)) // 48 83 EC 28 48 8B 0D ? ? ? ? 48 8D
R2::g_pModName = new char[iSize + 1];
strcpy(R2::g_pModName, pModName);
+ if (g_pVanillaCompatibility->GetVanillaCompatibility())
+ return false;
+
return (!strcmp("r2", pModName) || !strcmp("r1", pModName)) && !Tier0::CommandLine()->CheckParm("-norestrictservercommands");
}