diff --git a/src/client/component/colors.cpp b/src/client/component/colors.cpp index 66abb6b1..75eff23a 100644 --- a/src/client/component/colors.cpp +++ b/src/client/component/colors.cpp @@ -96,8 +96,7 @@ namespace colors const size_t unk, const size_t unk2) { // CL_GetClientName (CL_GetClientNameAndClantag?) - const auto result = reinterpret_cast(0x14025BAA0)( // H1 (1.4) - local_client_num, index, buf, size, unk, unk2); + const auto result = utils::hook::invoke(0x14025BAA0, local_client_num, index, buf, size, unk, unk2); utils::string::strip(buf, buf, size); diff --git a/src/client/component/command.cpp b/src/client/component/command.cpp index 01f7b241..b5c1ad40 100644 --- a/src/client/component/command.cpp +++ b/src/client/component/command.cpp @@ -91,7 +91,7 @@ namespace command void parse_commandline_stub() { parse_command_line(); - reinterpret_cast(0x1400D8210)(); // mwr: test + utils::hook::invoke(0x1400D8210); } game::dvar_t* dvar_command_stub() diff --git a/src/client/component/dedicated.cpp b/src/client/component/dedicated.cpp index dd9f920f..8de5e9ac 100644 --- a/src/client/component/dedicated.cpp +++ b/src/client/component/dedicated.cpp @@ -26,7 +26,7 @@ namespace dedicated initialized = true; // R_LoadGraphicsAssets - reinterpret_cast(0x1405DF4B0)(); + utils::hook::invoke(0x1405DF4B0); } void send_heartbeat() diff --git a/src/client/component/party.cpp b/src/client/component/party.cpp index 81159b58..0605afad 100644 --- a/src/client/component/party.cpp +++ b/src/client/component/party.cpp @@ -119,7 +119,7 @@ namespace party } // This function either does Dvar_SetString or Dvar_RegisterString for the given dvar - reinterpret_cast(0x1404FB210)(dvar_name, string); + utils::hook::invoke(0x1404FB210, dvar_name, string); } void disconnect_stub() @@ -129,12 +129,12 @@ namespace party if (game::CL_IsCgameInitialized()) { // CL_ForwardCommandToServer - reinterpret_cast(0x140253480)(0, "disconnect"); + utils::hook::invoke(0x140253480, 0, "disconnect"); // CL_WritePacket - reinterpret_cast(0x14024DB10)(0); + utils::hook::invoke(0x14024DB10, 0); } // CL_Disconnect - reinterpret_cast(0x140252060)(0); + utils::hook::invoke(0x140252060, 0); } } @@ -337,7 +337,8 @@ namespace party *reinterpret_cast(0x14A3A91D0) = 1; // sv_map_restart *reinterpret_cast(0x14A3A91D4) = 1; // sv_loadScripts *reinterpret_cast(0x14A3A91D8) = 0; // sv_migrate - reinterpret_cast(0x14047E7F0)(); // SV_CheckLoadGame + + utils::hook::invoke(0x14047E7F0); // SV_CheckLoadGame }); command::add("fast_restart", []()