2023-04-13 20:29:46 +02:00
//////////////////////////////////////////////////////////
// Dedicated server executable patch file; this executable
// also contains all patches listed in 'r5apex.exe.patch'.
2023-02-26 19:45:11 +01:00
2023-04-13 20:29:46 +02:00
/////////////////////////////
/////////////////////////////
//// Optimizations ////
/////////////////////////////
/////////////////////////////
// Unnecessary loop called from 'CModelLoader::UnloadModel'. This calls a 'nullsub' CMaterialGlue vtable method.
0x2553C0: "mov qword ptr ss:[rsp+0x10], rsi" --> "xor rax, rax; ret";
2023-02-26 22:20:06 +01:00
2023-04-13 20:29:46 +02:00
// CClientState constructor; Removed due to high mem allocation during init (100MiB+). 'CClientState' is useless on dedicated, and all its feature are thereof disabled.
0x6DA10: "sub rsp, 28h" --> "xor rax, rax; ret";
2023-02-26 22:20:06 +01:00
2023-04-13 20:29:46 +02:00
// RPak array contains 2 elements: 1='common_early', 2='ui'. Changing size to 1 only loads 'common_early'. 'ui' is not needed for dedi.
0x236354: "mov edi, 0x2" --> "mov edi, 0x1";
// Prevent 'g_pszMultiplayerUiPakName' from being assigned to string "ui_mp.rpak" (prevents it from loading this pak file).
0x340D07: "mov cs:g_pszMultiplayerUiPakName, rcx" --> "nop"
2023-02-26 21:47:32 +00:00
0x340FEA: "mov cs:g_pszMultiplayerUiPakName, rcx" --> "nop"
2023-04-10 22:36:32 +02:00
2023-04-13 20:29:46 +02:00
// Prevent 'fps_max' from being reset in 'CEngine::Frame' if 'sv_cheats' isn't set; this is bound to the server's tickrate in sdk code to save CPU time.
0x296587: "jnz short loc_1402971B7" --> "jmp short loc_1402971B7"