Small fix
This commit is contained in:
parent
50a0e137b0
commit
21b47530cf
@ -49,6 +49,10 @@ private:
|
|||||||
{
|
{
|
||||||
// Skip call to queryserverinfo handler in SV_ConnectionlessPacket
|
// Skip call to queryserverinfo handler in SV_ConnectionlessPacket
|
||||||
utils::hook::nop(0x4FE051, 5);
|
utils::hook::nop(0x4FE051, 5);
|
||||||
|
|
||||||
|
// Disable callvote/vote exploit
|
||||||
|
utils::hook::nop(0x47EB9D, 5);
|
||||||
|
utils::hook::nop(0x47EBC9, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __declspec(noreturn) void long_jump_stub(jmp_buf buf, const int value) noexcept(false)
|
static __declspec(noreturn) void long_jump_stub(jmp_buf buf, const int value) noexcept(false)
|
||||||
|
@ -93,12 +93,12 @@ game::native::gentity_s* test_clients::sv_add_test_client()
|
|||||||
|
|
||||||
void test_clients::spawn()
|
void test_clients::spawn()
|
||||||
{
|
{
|
||||||
auto* ent = test_clients::sv_add_test_client();
|
const auto* ent = test_clients::sv_add_test_client();
|
||||||
|
|
||||||
if (ent == nullptr)
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
if (ent != nullptr)
|
||||||
|
{
|
||||||
game::native::Scr_AddEntityNum(ent->s.number, 0);
|
game::native::Scr_AddEntityNum(ent->s.number, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_clients::scr_shutdown_system_mp_stub(unsigned char sys)
|
void test_clients::scr_shutdown_system_mp_stub(unsigned char sys)
|
||||||
@ -178,6 +178,9 @@ void test_clients::patch_mp()
|
|||||||
utils::hook(0x50C147, &test_clients::scr_shutdown_system_mp_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(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
|
utils::hook(0x576DCC, &test_clients::check_timeouts_stub_mp, HOOK_JUMP).install()->quick(); // SV_CheckTimeouts
|
||||||
|
|
||||||
|
// Replace nullsubbed gsc func "GScr_AddTestClient" with our spawn
|
||||||
|
utils::hook::set<void(*)()>(0x8AC8DC, test_clients::spawn);
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_MODULE(test_clients);
|
REGISTER_MODULE(test_clients);
|
||||||
|
Loading…
Reference in New Issue
Block a user