aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/miscserverfixes.cpp
diff options
context:
space:
mode:
authorgeni <me@geni.site>2022-01-02 23:36:57 +0200
committergeni <me@geni.site>2022-01-02 23:36:57 +0200
commit8d31f09d80af29eced10250eac86e354563f93ad (patch)
tree8bde313e0d0a1d5e0c8322abef6be842112aace4 /NorthstarDedicatedTest/miscserverfixes.cpp
parentff875c0551c54bb187b5320b81029f8fe7f010fb (diff)
downloadNorthstarLauncher-8d31f09d80af29eced10250eac86e354563f93ad.tar.gz
NorthstarLauncher-8d31f09d80af29eced10250eac86e354563f93ad.zip
NOP out call to VGUI_Shutdown
Avoids a crash that occurs when quitting the game from the console
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