aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/miscserverfixes.cpp
diff options
context:
space:
mode:
authorHappyDOGE <28511119+HappyDOGE@users.noreply.github.com>2022-01-16 13:12:50 +0300
committerHappyDOGE <28511119+HappyDOGE@users.noreply.github.com>2022-01-16 13:12:50 +0300
commit8e9338805062f53be1135d49b6021bd3ab8a220f (patch)
tree6c56076795299c601ed6afae5bac973b61585774 /NorthstarDedicatedTest/miscserverfixes.cpp
parent4f0e396e9774dad1eb03aa54f65c64da4b0e3a60 (diff)
parentd4d4e489e4a1435e1df3cd1a1e3666e7ae713829 (diff)
downloadNorthstarLauncher-8e9338805062f53be1135d49b6021bd3ab8a220f.tar.gz
NorthstarLauncher-8e9338805062f53be1135d49b6021bd3ab8a220f.zip
merge with upstream
Diffstat (limited to 'NorthstarDedicatedTest/miscserverfixes.cpp')
-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