From 853dd03f8422e4f01b65650ff3bb7dc6dc9995ab Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 21 May 2022 01:57:21 +0200 Subject: [PATCH] Remove additional overhead from dedicated server This should reduce CPU time even more (2 whole frame loops for chat room (client only) and discord presence (client only)). Idle mem has been reduced by .8MiB. --- r5dev/common/opcodes.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/r5dev/common/opcodes.cpp b/r5dev/common/opcodes.cpp index 260472ed..e3fb2bb0 100644 --- a/r5dev/common/opcodes.cpp +++ b/r5dev/common/opcodes.cpp @@ -201,6 +201,7 @@ void Dedicated_Init() gHost_Init_0.Offset(0x859).Patch({ 0xE9, 0x19, 0x04, 0x00, 0x00 }); // LEA --> RET | Disable 'client.dll' library initialization. gHost_Init_0.Offset(0xC77).Patch({ 0xE8, 0x44, 0xCF, 0xFF, 0xFF }); // CAL --> CAL | Disable user config loading and call entitlements.rson initialization instead. + gHost_Init_1.Offset(0x564).Patch({ 0xEB }); // JNZ --> JMP | Skip chat room and discord presence thread creation [!TODO: set global boolean instead]. gHost_Init_1.Offset(0x609).Patch({ 0xEB, 0x2B }); // JE --> JMP | Skip client.dll 'Init_PostVideo()' validation code. gHost_Init_1.Offset(0x621).Patch({ 0xEB, 0x0C }); // JNE --> JMP | Skip client.dll 'Init_PostVideo()' validation code. gHost_Init_1.Offset(0x658).Patch({ 0xE9, 0x8C, 0x00, 0x00, 0x00 }); // JE --> JMP | Skip NULL call as client is never initialized.