diff --git a/src/client/component/dvars_patches.cpp b/src/client/component/dvars_patches.cpp index f945c18d..43941f0d 100644 --- a/src/client/component/dvars_patches.cpp +++ b/src/client/component/dvars_patches.cpp @@ -13,7 +13,7 @@ namespace dvars_patches { void patch_dvars() { - (void)game::register_sessionmode_dvar_bool("com_pauseSupported", !game::is_server(), game::DVAR_SERVERINFO, "Whether is pause is ever supported by the game mode"); + (void)game::register_sessionmode_dvar_bool("com_pauseSupported", !game::is_server(), game::DVAR_SERVERINFO, "Whether pause is supported by the game mode"); } void patch_flags() @@ -59,14 +59,24 @@ namespace dvars_patches scheduler::once(patch_dvars, scheduler::pipeline::main); scheduler::once(patch_flags, scheduler::pipeline::main); - if (game::is_server()) - { - return; - } + if (game::is_client()) this->patch_client(); + else this->patch_server(); + } + static void patch_client() + { // toggle ADS dof based on r_dof_enable utils::hook::jump(0x141116EBB_g, utils::hook::assemble(dof_enabled_stub)); } + + static void patch_server() + { + // Set the max value of 'sv_network_fps' + utils::hook::set(0x140534FE7_g, 1000); + + // Set the flag of 'sv_network_fps' + utils::hook::set(0x140534FD8_g, game::DVAR_NONE); + } }; }