port name patch from s1x

This commit is contained in:
FutureRave 2022-10-04 11:20:59 +01:00
parent 18e4113462
commit 3936710e3b
No known key found for this signature in database
GPG Key ID: 22F9079C86CFAB31

View File

@ -43,6 +43,8 @@ private:
{ {
// Note: on SP the max value is already 1000 // Note: on SP the max value is already 1000
utils::hook(0x55411F, &dvar_register_com_max_fps, HOOK_CALL).install()->quick(); utils::hook(0x55411F, &dvar_register_com_max_fps, HOOK_CALL).install()->quick();
utils::hook(0x5C9980, &live_get_local_client_name_stub, HOOK_JUMP).install()->quick();
} }
void patch_dedi() const void patch_dedi() const
@ -72,6 +74,11 @@ private:
return game::native::Dvar_RegisterInt(dvarName, value, min, 1000, return game::native::Dvar_RegisterInt(dvarName, value, min, 1000,
game::native::dvar_flags::DVAR_ARCHIVE, description); game::native::dvar_flags::DVAR_ARCHIVE, description);
} }
static const char* live_get_local_client_name_stub()
{
return game::native::Dvar_FindVar("name")->current.string;
}
}; };
REGISTER_MODULE(patches) REGISTER_MODULE(patches)