aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarichello <artur@barichello.me>2022-01-06 18:48:09 -0300
committerGitHub <noreply@github.com>2022-01-06 18:48:09 -0300
commitca6d9978ed243243b0b902b2342190d705aa2598 (patch)
tree17f1ef9d4dafc1cada19419fc12f0053402fcd2f
parent733bf92983fa60abfaad6af5c0b9950c3d1e3a4e (diff)
parent8d31f09d80af29eced10250eac86e354563f93ad (diff)
downloadNorthstarLauncher-ca6d9978ed243243b0b902b2342190d705aa2598.tar.gz
NorthstarLauncher-ca6d9978ed243243b0b902b2342190d705aa2598.zip
Merge pull request #31 from geniiii/nop-vgui
NOP out call to VGUI_Shutdown during server DLL shutdown
-rw-r--r--NorthstarDedicatedTest/miscserverfixes.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/NorthstarDedicatedTest/miscserverfixes.cpp b/NorthstarDedicatedTest/miscserverfixes.cpp
index 2007a30c..5db9ebbd 100644
--- a/NorthstarDedicatedTest/miscserverfixes.cpp
+++ b/NorthstarDedicatedTest/miscserverfixes.cpp
@@ -6,8 +6,19 @@ void InitialiseMiscServerFixes(HMODULE baseAddress)
{
// ret at the start of the concommand GenerateObjFile as it can crash servers
{
- void* ptr = (char*)baseAddress + 0x38D920;
+ char* ptr = reinterpret_cast<char*>(baseAddress) + 0x38D920;
TempReadWrite rw(ptr);
- *((char*)ptr) = (char)0xC3;
+ *ptr = 0xC3;
+ }
+
+ // nop out call to VGUI shutdown since it crashes the game when quitting from the console
+ {
+ char* ptr = reinterpret_cast<char*>(baseAddress) + 0x154A96;
+ TempReadWrite rw(ptr);
+ *(ptr++) = 0x90; // nop
+ *(ptr++) = 0x90; // nop
+ *(ptr++) = 0x90; // nop
+ *(ptr++) = 0x90; // nop
+ *ptr = 0x90; // nop
}
} \ No newline at end of file