aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/miscserverfixes.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-01-09 00:19:39 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-01-09 00:19:39 +0000
commit2d31b6857683719e38d05052a11e1eff67807df9 (patch)
treec1353ce1838ec64b32f2ca6b951c59d827fcacc1 /NorthstarDedicatedTest/miscserverfixes.cpp
parentbd2d7e3deadb3d9142630ae633a17b02e2b09fff (diff)
parentf3f4a11cd26c737efad49e318ca7d1ef942d42c4 (diff)
downloadNorthstarLauncher-2d31b6857683719e38d05052a11e1eff67807df9.tar.gz
NorthstarLauncher-2d31b6857683719e38d05052a11e1eff67807df9.zip
Merge branch 'main' of https://github.com/R2Northstar/NorthstarLauncher
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