From 26d78c584ea3f2b17605f4d7deb493c6d783e831 Mon Sep 17 00:00:00 2001 From: rexx <67599507+r-ex@users.noreply.github.com> Date: Sat, 25 Sep 2021 22:54:11 +0100 Subject: [PATCH] temp dedi patches --- r5dedicated/opcodes.cpp | 21 +++++++++++++++++++++ r5dedicated/opcodes.h | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/r5dedicated/opcodes.cpp b/r5dedicated/opcodes.cpp index dbcd45fd..f53a53df 100644 --- a/r5dedicated/opcodes.cpp +++ b/r5dedicated/opcodes.cpp @@ -88,6 +88,7 @@ void Hooks::DedicatedPatch() *(uintptr_t*)0x14B3800D7 = 0x1; // bDedicated + DisableRenderer(); DisableClient(); DisableVGUI(); @@ -138,6 +139,26 @@ void Hooks::DedicatedPatch() // TODO: this is also used by server.dll library. e1.Offset(0x213).Patch({ 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + //------------------------------------------------------------------------- + // RET + c4.Patch({ 0xC3 }); + c5.Patch({ 0xC3 }); + c7.Patch({ 0xC3 }); + + //------------------------------------------------------------------------- + // JNE --> JMP | + c6.Offset(0x23).Patch({ 0xEB, 0x23 }); + + + //------------------------------------------------------------------------- + // JNE --> JMP | (TEMP) jump over some settings block issues. not sure what to do here + s3.Offset(0x16C).Patch({ 0xE9, 0x47, 0x01, 0x00 }); + + + + + OnLevelLoadingStarted.Offset(0x61).Patch({ 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + //------------------------------------------------------------------------- // ??? 1403DFC30 = 0x94490 ??? // an expensive stuff that wasted many CPU cycles, this one seems to be the best candidate to return } diff --git a/r5dedicated/opcodes.h b/r5dedicated/opcodes.h index 48d4c2f0..e32e3877 100644 --- a/r5dedicated/opcodes.h +++ b/r5dedicated/opcodes.h @@ -59,16 +59,22 @@ namespace MemoryAddress s0 = 0x0000000140237B00; // server Host_Init()? MemoryAddress s1 = 0x0000000140231C00; // _Host_RunFrame() with inlined CFrameTimer::MarkFrame()? MemoryAddress s2 = 0x00000001402312A0; // server HeartBeat? (baseserver.cpp) + MemoryAddress s3 = 0x0000000140FB36D0; // TEMP?? // CLIENT MemoryAddress c0 = 0x0000000140236640; // client Host_Init()? MemoryAddress c1 = 0x0000000140299100; // CreateGameWindowInit()? MemoryAddress c2 = 0x00000001403F4360; // 1403DF870 --> 1403F4360 MemoryAddress c3 = 0x00000001403F8A80; // 1403DF870 --> 1403F8A40 + MemoryAddress c4 = 0x00000001405C27B0; // CHLClient + 1000 + MemoryAddress c5 = 0x00000001405BAC00; // + MemoryAddress c6 = 0x00000001403CA2D0; // + MemoryAddress c7 = 0x00000001403CC750; // lightmaps? MemoryAddress CreateGameWindow = 0x0000000140343DE0; // VGUI MemoryAddress v0 = 0x0000000140282E40; // jumptable + MemoryAddress OnLevelLoadingStarted = 0x00000001402830D0; MemoryAddress SCR_BeginLoadingPlaque = 0x000000014023E870;