Specify stub is for mp as dedi signature is different

This commit is contained in:
FutureRave 2022-03-10 01:18:42 +00:00
parent c0a85c4f33
commit fe159d3bb4
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955
2 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@ void test_clients::spawn()
});
}
void test_clients::scr_shutdown_system_stub(unsigned char sys)
void test_clients::scr_shutdown_system_mp_stub(unsigned char sys)
{
game::native::SV_DropAllBots();
reinterpret_cast<void (*)(unsigned char)>(0x569E30)(sys);
@ -126,7 +126,7 @@ __declspec(naked) void test_clients::reset_reliable_mp()
mov [esi + 0x20E74], eax // Move eax to reliableAcknowledge
resume:
push 0x5CE740 // SV_Netchan_Transmit
push 0x5CE740 // Sys_Milliseconds
retn
}
}
@ -176,7 +176,7 @@ void test_clients::post_load()
void test_clients::patch_mp()
{
utils::hook::nop(0x639803, 5); // LiveSteamServer_RunFrame
utils::hook(0x50C147, &test_clients::scr_shutdown_system_stub, HOOK_CALL).install()->quick(); // G_ShutdownGame
utils::hook(0x50C147, &test_clients::scr_shutdown_system_mp_stub, HOOK_CALL).install()->quick(); // G_ShutdownGame
utils::hook(0x57BBF9, &test_clients::reset_reliable_mp, HOOK_CALL).install()->quick(); // SV_SendMessageToClient
utils::hook(0x576DCC, &test_clients::check_timeouts_stub_mp, HOOK_JUMP).install()->quick(); // SV_CheckTimeouts
}

View File

@ -16,7 +16,7 @@ private:
static game::native::gentity_s* sv_add_test_client();
static void spawn();
static void scr_shutdown_system_stub(unsigned char sys);
static void scr_shutdown_system_mp_stub(unsigned char sys);
static void reset_reliable_mp();