diff --git a/src/client/component/auth.cpp b/src/client/component/auth.cpp index 1a6b415a..47859ac1 100644 --- a/src/client/component/auth.cpp +++ b/src/client/component/auth.cpp @@ -37,7 +37,7 @@ namespace auth return {}; } - return std::string{ info.szHwProfileGuid, sizeof(info.szHwProfileGuid) }; + return std::string{info.szHwProfileGuid, sizeof(info.szHwProfileGuid)}; } std::string get_protected_data() @@ -53,7 +53,7 @@ namespace auth } const auto size = std::min(data_out.cbData, 52ul); - std::string result{ reinterpret_cast(data_out.pbData), size }; + std::string result{reinterpret_cast(data_out.pbData), size}; LocalFree(data_out.pbData); return result; @@ -97,7 +97,7 @@ namespace auth return false; } - const utils::info_string info_string{ std::string{params[2]} }; + const utils::info_string info_string{std::string{params[2]}}; const auto challenge = info_string.get("challenge"); connect_string.clear(); @@ -137,7 +137,7 @@ namespace auth return; } - const utils::info_string info_string{ std::string{params[2]} }; + const utils::info_string info_string{std::string{params[2]}}; const auto steam_id = info_string.get("xuid"); const auto challenge = info_string.get("challenge"); @@ -221,9 +221,9 @@ namespace auth } command::add("guid", []() - { - printf("Your guid: %llX\n", steam::SteamUser()->GetSteamID().bits); - }); + { + printf("Your guid: %llX\n", steam::SteamUser()->GetSteamID().bits); + }); } }; } diff --git a/src/client/component/binding.cpp b/src/client/component/binding.cpp index 153377b2..e40b7f42 100644 --- a/src/client/component/binding.cpp +++ b/src/client/component/binding.cpp @@ -135,4 +135,4 @@ namespace binding }; } -REGISTER_COMPONENT(binding::component) \ No newline at end of file +REGISTER_COMPONENT(binding::component) diff --git a/src/client/component/branding.cpp b/src/client/component/branding.cpp index cfa5d057..7097235e 100644 --- a/src/client/component/branding.cpp +++ b/src/client/component/branding.cpp @@ -1,16 +1,18 @@ #include #include "loader/component_loader.hpp" + #include "localized_strings.hpp" #include "scheduler.hpp" #include "command.hpp" +#include "version.hpp" + #include "game/game.hpp" +#include "game/dvars.hpp" #include #include -#include - -#include "version.hpp" +// fonts/default.otf, fonts/defaultBold.otf, fonts/fira_mono_regular.ttf, fonts/fira_mono_bold.ttf namespace branding { @@ -49,29 +51,26 @@ namespace branding SELECT_VALUE(0x1403B1C40, 0x1404E74C0), ui_get_formatted_build_number_stub); scheduler::loop([]() - { + { - const auto x = 4; - const auto y = 4; - const auto scale = 1.0f; - float color[4] = { 0.666f, 0.666f, 0.666f, 0.666f }; + const auto x = 4; + const auto y = 4; + const auto scale = 1.0f; + float color[4] = {0.666f, 0.666f, 0.666f, 0.666f}; - const auto* text = "H1-Mod: " VERSION; + const auto* text = "H1-Mod: " VERSION; - auto* font = game::R_RegisterFont("fonts/fira_mono_bold.ttf", 20); + auto* font = game::R_RegisterFont("fonts/fira_mono_bold.ttf", 20); - if (!font) return; + if (!font) return; - game::R_AddCmdDrawText(text, 0x7FFFFFFF, font, static_cast(x), - y + static_cast(font->pixelHeight) * scale, - scale, scale, 0.0f, color, 0); + game::R_AddCmdDrawText(text, 0x7FFFFFFF, font, static_cast(x), + y + static_cast(font->pixelHeight) * scale, + scale, scale, 0.0f, color, 0); - }, scheduler::pipeline::renderer); + }, scheduler::pipeline::renderer); } }; } REGISTER_COMPONENT(branding::component) - - -// fonts/default.otf, fonts/defaultBold.otf, fonts/fira_mono_regular.ttf, fonts/fira_mono_bold.ttf diff --git a/src/client/component/colors.cpp b/src/client/component/colors.cpp index 8ecbfbf1..66abb6b1 100644 --- a/src/client/component/colors.cpp +++ b/src/client/component/colors.cpp @@ -118,7 +118,7 @@ namespace colors } else if (index == ':') { - *color = hsv_to_rgb({ static_cast((game::Sys_Milliseconds() / 100) % 256), 255, 255 }); + *color = hsv_to_rgb({static_cast((game::Sys_Milliseconds() / 100) % 256), 255, 255}); } else if (index == ';') { @@ -180,4 +180,4 @@ namespace colors }; } -REGISTER_COMPONENT(colors::component) \ No newline at end of file +REGISTER_COMPONENT(colors::component) diff --git a/src/client/component/command.cpp b/src/client/component/command.cpp index 4386d98d..a80c67f2 100644 --- a/src/client/component/command.cpp +++ b/src/client/component/command.cpp @@ -240,10 +240,10 @@ namespace command void enum_assets(const game::XAssetType type, const std::function& callback, const bool includeOverride) { game::DB_EnumXAssets_Internal(type, static_cast([](game::XAssetHeader header, void* data) - { - const auto& cb = *static_cast*>(data); - cb(header); - }), &callback, includeOverride); + { + const auto& cb = *static_cast*>(data); + cb(header); + }), &callback, includeOverride); } class component final : public component_interface @@ -261,6 +261,7 @@ namespace command add_commands_mp(); } + add_commands_generic(); } @@ -270,9 +271,9 @@ namespace command add("quit", game::Com_Quit_f); //add("quit_hard", utils::nt::raise_hard_exception); /* this command delivers you to a windows blue screen, its quit hard from windows xD */ add("crash", []() - { - *reinterpret_cast(1) = 0; - }); + { + *reinterpret_cast(1) = 0; + }); /*add("consoleList", [](const params& params) { @@ -298,165 +299,164 @@ namespace command });*/ add("commandDump", [](const params& argument) + { + console::info("================================ COMMAND DUMP =====================================\n"); + game::cmd_function_s* cmd = (*game::cmd_functions); + std::string filename; + if (argument.size() == 2) { - console::info("================================ COMMAND DUMP =====================================\n"); - game::cmd_function_s* cmd = (*game::cmd_functions); - std::string filename; - if (argument.size() == 2) + filename = "h1-mod/"; + filename.append(argument[1]); + if (!filename.ends_with(".txt")) { - filename = "h1-mod/"; - filename.append(argument[1]); - if (!filename.ends_with(".txt")) - { - filename.append(".txt"); - } + filename.append(".txt"); } - int i = 0; - while (cmd) - { - if (cmd->name) - { - if (!filename.empty()) - { - const auto line = std::format("{}\r\n", cmd->name); - utils::io::write_file(filename, line, i != 0); - } - console::info("%s\n", cmd->name); - i++; - } - cmd = cmd->next; - } - console::info("\n%i commands\n", i); - console::info("================================ END COMMAND DUMP =================================\n"); - }); - - /* - add("listassetpool", [](const params& params) + } + int i = 0; + while (cmd) { - if (params.size() < 2) + if (cmd->name) { - console::info("listassetpool [filter]: list all the assets in the specified pool\n"); - - for (auto i = 0; i < game::XAssetType::ASSET_TYPE_COUNT; i++) + if (!filename.empty()) { - console::info("%d %s\n", i, game::g_assetNames[i]); + const auto line = std::format("{}\r\n", cmd->name); + utils::io::write_file(filename, line, i != 0); } + console::info("%s\n", cmd->name); + i++; } - else - { - const auto type = static_cast(atoi(params.get(1))); + cmd = cmd->next; + } + console::info("\n%i commands\n", i); + console::info("================================ END COMMAND DUMP =================================\n"); + }); - if (type < 0 || type >= game::XAssetType::ASSET_TYPE_COUNT) + /*add("listassetpool", [](const params& params) + { + if (params.size() < 2) + { + console::info("listassetpool [filter]: list all the assets in the specified pool\n"); + + for (auto i = 0; i < game::XAssetType::ASSET_TYPE_COUNT; i++) + { + console::info("%d %s\n", i, game::g_assetNames[i]); + } + } + else + { + const auto type = static_cast(atoi(params.get(1))); + + if (type < 0 || type >= game::XAssetType::ASSET_TYPE_COUNT) + { + console::error("Invalid pool passed must be between [%d, %d]\n", 0, game::XAssetType::ASSET_TYPE_COUNT - 1); + return; + } + + console::info("Listing assets in pool %s\n", game::g_assetNames[type]); + + const std::string filter = params.get(2); + enum_assets(type, [type, filter](const game::XAssetHeader header) + { + const auto asset = game::XAsset{type, header}; + const auto* const asset_name = game::DB_GetXAssetName(&asset); + //const auto entry = game::DB_FindXAssetEntry(type, asset_name); + //TODO: display which zone the asset is from + + if (!filter.empty() && !game_console::match_compare(filter, asset_name, false)) { - console::error("Invalid pool passed must be between [%d, %d]\n", 0, game::XAssetType::ASSET_TYPE_COUNT - 1); return; } - console::info("Listing assets in pool %s\n", game::g_assetNames[type]); - - const std::string filter = params.get(2); - enum_assets(type, [type, filter](const game::XAssetHeader header) - { - const auto asset = game::XAsset{ type, header }; - const auto* const asset_name = game::DB_GetXAssetName(&asset); - //const auto entry = game::DB_FindXAssetEntry(type, asset_name); - //TODO: display which zone the asset is from - - if (!filter.empty() && !game_console::match_compare(filter, asset_name, false)) - { - return; - } - - console::info("%s\n", asset_name); - }, true); - } - }); + console::info("%s\n", asset_name); + }, true); + } + }); add("vstr", [](const params& params) + { + if (params.size() < 2) { - if (params.size() < 2) - { - console::info("vstr : execute a variable command\n"); - return; - } + console::info("vstr : execute a variable command\n"); + return; + } - const auto* dvarName = params.get(1); - const auto* dvar = game::Dvar_FindVar(dvarName); + const auto* dvarName = params.get(1); + const auto* dvar = game::Dvar_FindVar(dvarName); - if (dvar == nullptr) - { - console::info("%s doesn't exist\n", dvarName); - return; - } + if (dvar == nullptr) + { + console::info("%s doesn't exist\n", dvarName); + return; + } - if (dvar->type != game::dvar_type::string - && dvar->type != game::dvar_type::enumeration) - { - console::info("%s is not a string-based dvar\n", dvar->hash); - return; - } + if (dvar->type != game::dvar_type::string + && dvar->type != game::dvar_type::enumeration) + { + console::info("%s is not a string-based dvar\n", dvar->hash); + return; + } - execute(dvar->current.string); - });*/ + execute(dvar->current.string); + });*/ } static void add_commands_sp() { add("god", []() + { + if (!game::SV_Loaded()) { - if (!game::SV_Loaded()) - { - return; - } + return; + } - game::sp::g_entities[0].flags ^= 1; - game::CG_GameMessage(0, utils::string::va("godmode %s", - game::sp::g_entities[0].flags & 1 - ? "^2on" - : "^1off")); - }); + game::sp::g_entities[0].flags ^= 1; + game::CG_GameMessage(0, utils::string::va("godmode %s", + game::sp::g_entities[0].flags & 1 + ? "^2on" + : "^1off")); + }); add("demigod", []() + { + if (!game::SV_Loaded()) { - if (!game::SV_Loaded()) - { - return; - } + return; + } - game::sp::g_entities[0].flags ^= 2; - game::CG_GameMessage(0, utils::string::va("demigod mode %s", - game::sp::g_entities[0].flags & 2 - ? "^2on" - : "^1off")); - }); + game::sp::g_entities[0].flags ^= 2; + game::CG_GameMessage(0, utils::string::va("demigod mode %s", + game::sp::g_entities[0].flags & 2 + ? "^2on" + : "^1off")); + }); add("notarget", []() + { + if (!game::SV_Loaded()) { - if (!game::SV_Loaded()) - { - return; - } + return; + } - game::sp::g_entities[0].flags ^= 4; - game::CG_GameMessage(0, utils::string::va("notarget %s", - game::sp::g_entities[0].flags & 4 - ? "^2on" - : "^1off")); - }); + game::sp::g_entities[0].flags ^= 4; + game::CG_GameMessage(0, utils::string::va("notarget %s", + game::sp::g_entities[0].flags & 4 + ? "^2on" + : "^1off")); + }); add("noclip", []() + { + if (!game::SV_Loaded()) { - if (!game::SV_Loaded()) - { - return; - } + return; + } - game::sp::g_entities[0].client->flags ^= 1; - game::CG_GameMessage(0, utils::string::va("noclip %s", - game::sp::g_entities[0].client->flags & 1 - ? "^2on" - : "^1off")); - }); + game::sp::g_entities[0].client->flags ^= 1; + game::CG_GameMessage(0, utils::string::va("noclip %s", + game::sp::g_entities[0].client->flags & 1 + ? "^2on" + : "^1off")); + }); add("ufo", []() { @@ -473,50 +473,50 @@ namespace command }); add("give", [](const params& params) + { + if (!game::SV_Loaded()) { - if (!game::SV_Loaded()) - { - return; - } + return; + } - if (params.size() < 2) - { - game::CG_GameMessage(0, "You did not specify a weapon name"); - return; - } + if (params.size() < 2) + { + game::CG_GameMessage(0, "You did not specify a weapon name"); + return; + } - auto ps = game::SV_GetPlayerstateForClientNum(0); - const auto wp = game::G_GetWeaponForName(params.get(1)); - if (wp) + auto ps = game::SV_GetPlayerstateForClientNum(0); + const auto wp = game::G_GetWeaponForName(params.get(1)); + if (wp) + { + if (game::G_GivePlayerWeapon(ps, wp, 0, 0, 0, 0, 0, 0)) { - if (game::G_GivePlayerWeapon(ps, wp, 0, 0, 0, 0, 0, 0)) - { - game::G_InitializeAmmo(ps, wp, 0); - game::G_SelectWeapon(0, wp); - } + game::G_InitializeAmmo(ps, wp, 0); + game::G_SelectWeapon(0, wp); } - }); + } + }); add("take", [](const params& params) + { + if (!game::SV_Loaded()) { - if (!game::SV_Loaded()) - { - return; - } + return; + } - if (params.size() < 2) - { - game::CG_GameMessage(0, "You did not specify a weapon name"); - return; - } + if (params.size() < 2) + { + game::CG_GameMessage(0, "You did not specify a weapon name"); + return; + } - auto ps = game::SV_GetPlayerstateForClientNum(0); - const auto wp = game::G_GetWeaponForName(params.get(1)); - if (wp) - { - game::G_TakePlayerWeapon(ps, wp); - } - }); + auto ps = game::SV_GetPlayerstateForClientNum(0); + const auto wp = game::G_GetWeaponForName(params.get(1)); + if (wp) + { + game::G_TakePlayerWeapon(ps, wp); + } + }); } static void add_commands_mp() @@ -524,143 +524,143 @@ namespace command //client_command_hook.create(0x1402E98F0, &client_command); /*add_sv("god", [](const int client_num, const params_sv&) + { + if (!game::Dvar_FindVar("sv_cheats")->current.enabled) { - if (!game::Dvar_FindVar("sv_cheats")->current.enabled) - { - game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - "f \"Cheats are not enabled on this server\""); - return; - } - - game::mp::g_entities[client_num].flags ^= 1; game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - utils::string::va("f \"godmode %s\"", - game::mp::g_entities[client_num].flags & 1 - ? "^2on" - : "^1off")); - }); + "f \"Cheats are not enabled on this server\""); + return; + } + + game::mp::g_entities[client_num].flags ^= 1; + game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, + utils::string::va("f \"godmode %s\"", + game::mp::g_entities[client_num].flags & 1 + ? "^2on" + : "^1off")); + }); add_sv("demigod", [](const int client_num, const params_sv&) + { + if (!game::Dvar_FindVar("sv_cheats")->current.enabled) { - if (!game::Dvar_FindVar("sv_cheats")->current.enabled) - { - game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - "f \"Cheats are not enabled on this server\""); - return; - } - - game::mp::g_entities[client_num].flags ^= 2; game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - utils::string::va("f \"demigod mode %s\"", - game::mp::g_entities[client_num].flags & 2 - ? "^2on" - : "^1off")); - }); + "f \"Cheats are not enabled on this server\""); + return; + } + + game::mp::g_entities[client_num].flags ^= 2; + game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, + utils::string::va("f \"demigod mode %s\"", + game::mp::g_entities[client_num].flags & 2 + ? "^2on" + : "^1off")); + }); add_sv("notarget", [](const int client_num, const params_sv&) + { + if (!game::Dvar_FindVar("sv_cheats")->current.enabled) { - if (!game::Dvar_FindVar("sv_cheats")->current.enabled) - { - game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - "f \"Cheats are not enabled on this server\""); - return; - } - - game::mp::g_entities[client_num].flags ^= 4; game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - utils::string::va("f \"notarget %s\"", - game::mp::g_entities[client_num].flags & 4 - ? "^2on" - : "^1off")); - }); + "f \"Cheats are not enabled on this server\""); + return; + } + + game::mp::g_entities[client_num].flags ^= 4; + game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, + utils::string::va("f \"notarget %s\"", + game::mp::g_entities[client_num].flags & 4 + ? "^2on" + : "^1off")); + }); add_sv("noclip", [](const int client_num, const params_sv&) + { + if (!game::Dvar_FindVar("sv_cheats")->current.enabled) { - if (!game::Dvar_FindVar("sv_cheats")->current.enabled) - { - game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - "f \"Cheats are not enabled on this server\""); - return; - } - - game::mp::g_entities[client_num].client->flags ^= 1; game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - utils::string::va("f \"noclip %s\"", - game::mp::g_entities[client_num].client->flags & 1 - ? "^2on" - : "^1off")); - }); + "f \"Cheats are not enabled on this server\""); + return; + } + + game::mp::g_entities[client_num].client->flags ^= 1; + game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, + utils::string::va("f \"noclip %s\"", + game::mp::g_entities[client_num].client->flags & 1 + ? "^2on" + : "^1off")); + }); add_sv("ufo", [](const int client_num, const params_sv&) + { + if (!game::Dvar_FindVar("sv_cheats")->current.enabled) { - if (!game::Dvar_FindVar("sv_cheats")->current.enabled) - { - game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - "f \"Cheats are not enabled on this server\""); - return; - } - - game::mp::g_entities[client_num].client->flags ^= 2; game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - utils::string::va("f \"ufo %s\"", - game::mp::g_entities[client_num].client->flags & 2 - ? "^2on" - : "^1off")); - }); + "f \"Cheats are not enabled on this server\""); + return; + } + + game::mp::g_entities[client_num].client->flags ^= 2; + game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, + utils::string::va("f \"ufo %s\"", + game::mp::g_entities[client_num].client->flags & 2 + ? "^2on" + : "^1off")); + }); add_sv("give", [](const int client_num, const params_sv& params) + { + if (!game::Dvar_FindVar("sv_cheats")->current.enabled) { - if (!game::Dvar_FindVar("sv_cheats")->current.enabled) - { - game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - "f \"Cheats are not enabled on this server\""); - return; - } + game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, + "f \"Cheats are not enabled on this server\""); + return; + } - if (params.size() < 2) - { - game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - "f \"You did not specify a weapon name\""); - return; - } + if (params.size() < 2) + { + game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, + "f \"You did not specify a weapon name\""); + return; + } - auto ps = game::SV_GetPlayerstateForClientNum(client_num); - const auto wp = game::G_GetWeaponForName(params.get(1)); - if (wp) + auto ps = game::SV_GetPlayerstateForClientNum(client_num); + const auto wp = game::G_GetWeaponForName(params.get(1)); + if (wp) + { + if (game::G_GivePlayerWeapon(ps, wp, 0, 0, 0, 0, 0, 0)) { - if (game::G_GivePlayerWeapon(ps, wp, 0, 0, 0, 0, 0, 0)) - { - game::G_InitializeAmmo(ps, wp, 0); - game::G_SelectWeapon(client_num, wp); - } + game::G_InitializeAmmo(ps, wp, 0); + game::G_SelectWeapon(client_num, wp); } - }); + } + }); add_sv("take", [](const int client_num, const params_sv& params) + { + if (!game::Dvar_FindVar("sv_cheats")->current.enabled) { - if (!game::Dvar_FindVar("sv_cheats")->current.enabled) - { - game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - "f \"Cheats are not enabled on this server\""); - return; - } + game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, + "f \"Cheats are not enabled on this server\""); + return; + } - if (params.size() < 2) - { - game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, - "f \"You did not specify a weapon name\""); - return; - } + if (params.size() < 2) + { + game::SV_GameSendServerCommand(client_num, game::SV_CMD_RELIABLE, + "f \"You did not specify a weapon name\""); + return; + } - auto ps = game::SV_GetPlayerstateForClientNum(client_num); - const auto wp = game::G_GetWeaponForName(params.get(1)); - if (wp) - { - game::G_TakePlayerWeapon(ps, wp); - } - }); */ + auto ps = game::SV_GetPlayerstateForClientNum(client_num); + const auto wp = game::G_GetWeaponForName(params.get(1)); + if (wp) + { + game::G_TakePlayerWeapon(ps, wp); + } + });*/ } }; } -REGISTER_COMPONENT(command::component) \ No newline at end of file +REGISTER_COMPONENT(command::component) diff --git a/src/client/component/console.cpp b/src/client/component/console.cpp index 260d8f7e..7534d83a 100644 --- a/src/client/component/console.cpp +++ b/src/client/component/console.cpp @@ -41,16 +41,16 @@ namespace console const auto count = _vsnprintf_s(buffer, sizeof(buffer), sizeof(buffer), message, *ap); if (count < 0) return {}; - return { buffer, static_cast(count) }; + return {buffer, static_cast(count)}; } void dispatch_message(const int type, const std::string& message) { game_console::print(type, message); messages.access([&message](message_queue& msgs) - { - msgs.emplace(message); - }); + { + msgs.emplace(message); + }); } void append_text(const char* text) @@ -130,46 +130,46 @@ namespace console void initialize() { this->console_thread_ = utils::thread::create_named_thread("Console", [this]() + { + if (game::environment::is_dedi() || !utils::flags::has_flag("noconsole")) { - if (game::environment::is_dedi() || !utils::flags::has_flag("noconsole")) - { - game::Sys_ShowConsole(); - } + game::Sys_ShowConsole(); + } - if (!game::environment::is_dedi()) - { - // Hide that shit - ShowWindow(console::get_window(), SW_MINIMIZE); - } + if (!game::environment::is_dedi()) + { + // Hide that shit + ShowWindow(console::get_window(), SW_MINIMIZE); + } + { + messages.access([&](message_queue&) { - messages.access([&](message_queue&) - { - this->console_initialized_ = true; - }); - } + this->console_initialized_ = true; + }); + } - MSG msg; - while (!this->terminate_runner_) + MSG msg; + while (!this->terminate_runner_) + { + if (PeekMessageA(&msg, nullptr, NULL, NULL, PM_REMOVE)) { - if (PeekMessageA(&msg, nullptr, NULL, NULL, PM_REMOVE)) + if (msg.message == WM_QUIT) { - if (msg.message == WM_QUIT) - { - command::execute("quit", false); - break; - } + command::execute("quit", false); + break; + } - TranslateMessage(&msg); - DispatchMessage(&msg); - } - else - { - this->log_messages(); - std::this_thread::sleep_for(1ms); - } + TranslateMessage(&msg); + DispatchMessage(&msg); } - }); + else + { + this->log_messages(); + std::this_thread::sleep_for(1ms); + } + } + }); } void log_messages() @@ -257,4 +257,4 @@ namespace console } } -REGISTER_COMPONENT(console::component) \ No newline at end of file +REGISTER_COMPONENT(console::component) diff --git a/src/client/component/demonware.cpp b/src/client/component/demonware.cpp index 9bf97a75..90c24764 100644 --- a/src/client/component/demonware.cpp +++ b/src/client/component/demonware.cpp @@ -29,15 +29,15 @@ namespace demonware tcp_server* find_server(const SOCKET socket) { return socket_map.access([&](const std::unordered_map& map) -> tcp_server* + { + const auto entry = map.find(socket); + if (entry == map.end()) { - const auto entry = map.find(socket); - if (entry == map.end()) - { - return nullptr; - } + return nullptr; + } - return entry->second; - }); + return entry->second; + }); } bool socket_link(const SOCKET socket, const uint32_t address) @@ -49,9 +49,9 @@ namespace demonware } socket_map.access([&](std::unordered_map& map) - { - map[socket] = server; - }); + { + map[socket] = server; + }); return true; } @@ -59,47 +59,47 @@ namespace demonware void socket_unlink(const SOCKET socket) { socket_map.access([&](std::unordered_map& map) + { + const auto entry = map.find(socket); + if (entry != map.end()) { - const auto entry = map.find(socket); - if (entry != map.end()) - { - map.erase(entry); - } - }); + map.erase(entry); + } + }); } bool is_socket_blocking(const SOCKET socket, const bool def) { return blocking_sockets.access([&](std::unordered_map& map) + { + const auto entry = map.find(socket); + if (entry == map.end()) { - const auto entry = map.find(socket); - if (entry == map.end()) - { - return def; - } + return def; + } - return entry->second; - }); + return entry->second; + }); } void remove_blocking_socket(const SOCKET socket) { blocking_sockets.access([&](std::unordered_map& map) + { + const auto entry = map.find(socket); + if (entry != map.end()) { - const auto entry = map.find(socket); - if (entry != map.end()) - { - map.erase(entry); - } - }); + map.erase(entry); + } + }); } void add_blocking_socket(const SOCKET socket, const bool block) { blocking_sockets.access([&](std::unordered_map& map) - { - map[socket] = block; - }); + { + map[socket] = block; + }); } void server_main() @@ -213,7 +213,7 @@ namespace demonware if (server) { - server->handle_input(buf, len, { s, to, tolen }); + server->handle_input(buf, len, {s, to, tolen}); return len; } @@ -231,13 +231,13 @@ namespace demonware size_t result = 0; udp_servers.for_each([&](udp_server& server) + { + if (server.pending_data(s)) { - if (server.pending_data(s)) - { - result = server.handle_output( - s, buf, static_cast(len), from, fromlen); - } - }); + result = server.handle_output( + s, buf, static_cast(len), from, fromlen); + } + }); if (result) { @@ -260,39 +260,39 @@ namespace demonware std::vector write_sockets; socket_map.access([&](std::unordered_map& sockets) + { + for (auto& s : sockets) { - for (auto& s : sockets) + if (readfds) { - if (readfds) + if (FD_ISSET(s.first, readfds)) { - if (FD_ISSET(s.first, readfds)) + if (s.second->pending_data()) { - if (s.second->pending_data()) - { - read_sockets.push_back(s.first); - FD_CLR(s.first, readfds); - } - } - } - - if (writefds) - { - if (FD_ISSET(s.first, writefds)) - { - write_sockets.push_back(s.first); - FD_CLR(s.first, writefds); - } - } - - if (exceptfds) - { - if (FD_ISSET(s.first, exceptfds)) - { - FD_CLR(s.first, exceptfds); + read_sockets.push_back(s.first); + FD_CLR(s.first, readfds); } } } - }); + + if (writefds) + { + if (FD_ISSET(s.first, writefds)) + { + write_sockets.push_back(s.first); + FD_CLR(s.first, writefds); + } + } + + if (exceptfds) + { + if (FD_ISSET(s.first, exceptfds)) + { + FD_CLR(s.first, exceptfds); + } + } + } + }); if ((!readfds || readfds->fd_count == 0) && (!writefds || writefds->fd_count == 0)) { @@ -454,4 +454,4 @@ namespace demonware }; } -REGISTER_COMPONENT(demonware::component) \ No newline at end of file +REGISTER_COMPONENT(demonware::component) diff --git a/src/client/component/fps.cpp b/src/client/component/fps.cpp index 652ce7ee..3e06f2e0 100644 --- a/src/client/component/fps.cpp +++ b/src/client/component/fps.cpp @@ -12,12 +12,12 @@ namespace fps { namespace { - float fps_color_good[4] = { 0.6f, 1.0f, 0.0f, 1.0f }; - float fps_color_ok[4] = { 1.0f, 0.7f, 0.3f, 1.0f }; - float fps_color_bad[4] = { 1.0f, 0.3f, 0.3f, 1.0f }; + float fps_color_good[4] = {0.6f, 1.0f, 0.0f, 1.0f}; + float fps_color_ok[4] = {1.0f, 0.7f, 0.3f, 1.0f}; + float fps_color_bad[4] = {1.0f, 0.3f, 0.3f, 1.0f}; - //float origin_color[4] = { 1.0f, 0.67f, 0.13f, 1.0f }; - float ping_color[4] = { 1.0f, 1.0f, 1.0f, 0.65f }; + //float origin_color[4] = {1.0f, 0.67f, 0.13f, 1.0f}; + float ping_color[4] = {1.0f, 1.0f, 1.0f, 0.65f}; struct cg_perf_data { @@ -36,7 +36,7 @@ namespace fps std::int32_t max{}; }; - cg_perf_data cg_perf = cg_perf_data(); + cg_perf_data cg_perf{}; void perf_calc_fps(cg_perf_data* data, const std::int32_t value) { @@ -175,4 +175,4 @@ namespace fps }; } -REGISTER_COMPONENT(fps::component) \ No newline at end of file +REGISTER_COMPONENT(fps::component) diff --git a/src/client/component/game_console.cpp b/src/client/component/game_console.cpp index dca1d458..472aa568 100644 --- a/src/client/component/game_console.cpp +++ b/src/client/component/game_console.cpp @@ -58,8 +58,8 @@ namespace game_console std::string fixed_input{}; std::vector matches{}; - float color_white[4] = { 1.0f, 1.0f, 1.0f, 1.0f }; - float color_title[4] = { 0.9f, 0.9f, 0.5f, 1.0f }; + float color_white[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + float color_title[4] = {0.9f, 0.9f, 0.5f, 1.0f}; void clear() { @@ -73,18 +73,18 @@ namespace game_console void print_internal(const std::string& data) { con.output.access([&](output_queue& output) + { + if (con.visible_line_count > 0 + && con.display_line_offset == (output.size() - con.visible_line_count)) { - if (con.visible_line_count > 0 - && con.display_line_offset == (output.size() - con.visible_line_count)) - { - con.display_line_offset++; - } - output.push_back(data); - if (output.size() > 512) - { - output.pop_front(); - } - }); + con.display_line_offset++; + } + output.push_back(data); + if (output.size() > 512) + { + output.pop_front(); + } + }); } void toggle_console() @@ -243,7 +243,6 @@ namespace game_console con.globals.left_x = con.globals.x; con.globals.auto_complete_choice[0] = 0; - game::R_AddCmdDrawTextWithCursor(con.buffer, 0x7FFFFFFF, console_font, 18, con.globals.x, con.globals.y + con.globals.font_height, 1.0f, 1.0f, 0, color_white, 0, con.cursor, '|'); @@ -251,7 +250,6 @@ namespace game_console game::R_AddCmdDrawText(con.buffer, 0x7FFF, console_font, con.globals.x, con.globals.y + con.globals.font_height, 1.0f, 1.0f, 0.0f, color_white, 0); - // check if using a prefixed '/' or not const auto input = con.buffer[1] && (con.buffer[0] == '/' || con.buffer[0] == '\\') ? std::string(con.buffer).substr(1) @@ -336,8 +334,6 @@ namespace game_console } } - - void draw_output_scrollbar(const float x, float y, const float width, const float height, output_queue& output) { const auto _x = (x + width) - 10.0f; @@ -383,21 +379,21 @@ namespace game_console void draw_output_window() { con.output.access([](output_queue& output) - { - draw_box(con.screen_min[0], con.screen_min[1] + 32.0f, con.screen_max[0] - con.screen_min[0], - (con.screen_max[1] - con.screen_min[1]) - 32.0f, dvars::con_outputWindowColor->current.vector); + { + draw_box(con.screen_min[0], con.screen_min[1] + 32.0f, con.screen_max[0] - con.screen_min[0], + (con.screen_max[1] - con.screen_min[1]) - 32.0f, dvars::con_outputWindowColor->current.vector); - const auto x = con.screen_min[0] + 6.0f; - const auto y = (con.screen_min[1] + 32.0f) + 6.0f; - const auto width = (con.screen_max[0] - con.screen_min[0]) - 12.0f; - const auto height = ((con.screen_max[1] - con.screen_min[1]) - 32.0f) - 12.0f; + const auto x = con.screen_min[0] + 6.0f; + const auto y = (con.screen_min[1] + 32.0f) + 6.0f; + const auto width = (con.screen_max[0] - con.screen_min[0]) - 12.0f; + const auto height = ((con.screen_max[1] - con.screen_min[1]) - 32.0f) - 12.0f; - game::R_AddCmdDrawText("H1-Mod 1.4", 0x7FFFFFFF, console_font, x, - ((height - 16.0f) + y) + console_font->pixelHeight, 1.0f, 1.0f, 0.0f, color_title, 0); + game::R_AddCmdDrawText("H1-Mod 1.4", 0x7FFFFFFF, console_font, x, + ((height - 16.0f) + y) + console_font->pixelHeight, 1.0f, 1.0f, 0.0f, color_title, 0); - draw_output_scrollbar(x, y, width, height, output); - draw_output_text(x, y, output); - }); + draw_output_scrollbar(x, y, width, height, output); + draw_output_text(x, y, output); + }); } void draw_console() @@ -423,7 +419,7 @@ namespace game_console void print_internal(const char* fmt, ...) { - char va_buffer[0x200] = { 0 }; + char va_buffer[0x200] = {0}; va_list ap; va_start(ap, fmt); @@ -516,9 +512,9 @@ namespace game_console con.line_count = 0; con.display_line_offset = 0; con.output.access([](output_queue& output) - { - output.clear(); - }); + { + output.clear(); + }); history_index = -1; history.clear(); @@ -652,23 +648,23 @@ namespace game_console if (key == game::keyNum_t::K_MWHEELUP || key == game::keyNum_t::K_PGUP) { con.output.access([](output_queue& output) + { + if (output.size() > con.visible_line_count && con.display_line_offset > 0) { - if (output.size() > con.visible_line_count && con.display_line_offset > 0) - { - con.display_line_offset--; - } - }); + con.display_line_offset--; + } + }); } else if (key == game::keyNum_t::K_MWHEELDOWN || key == game::keyNum_t::K_PGDN) { con.output.access([](output_queue& output) + { + if (output.size() > con.visible_line_count + && con.display_line_offset < (output.size() - con.visible_line_count)) { - if (output.size() > con.visible_line_count - && con.display_line_offset < (output.size() - con.visible_line_count)) - { - con.display_line_offset++; - } - }); + con.display_line_offset++; + } + }); } if (key == game::keyNum_t::K_ENTER) @@ -746,17 +742,17 @@ namespace game_console // add clear command command::add("clear", [&]() + { + clear(); + con.line_count = 0; + con.display_line_offset = 0; + con.output.access([](output_queue& output) { - clear(); - con.line_count = 0; - con.display_line_offset = 0; - con.output.access([](output_queue& output) - { - output.clear(); - }); - history_index = -1; - history.clear(); + output.clear(); }); + history_index = -1; + history.clear(); + }); // add our dvars dvars::con_inputBoxColor = dvars::register_vec4("con_inputBoxColor", 0.2f, 0.2f, 0.2f, 0.9f, 0.0f, 1.0f, @@ -791,4 +787,4 @@ namespace game_console }; } -REGISTER_COMPONENT(game_console::component) \ No newline at end of file +REGISTER_COMPONENT(game_console::component) diff --git a/src/client/component/game_module.cpp b/src/client/component/game_module.cpp index e53997bb..bd984624 100644 --- a/src/client/component/game_module.cpp +++ b/src/client/component/game_module.cpp @@ -90,7 +90,7 @@ namespace game_module utils::nt::library get_game_module() { - static utils::nt::library game{ HMODULE(0x140000000) }; + static utils::nt::library game{HMODULE(0x140000000)}; return game; } @@ -115,4 +115,4 @@ namespace game_module }; } -REGISTER_COMPONENT(game_module::component) \ No newline at end of file +REGISTER_COMPONENT(game_module::component) diff --git a/src/client/component/input.cpp b/src/client/component/input.cpp index ed446e72..4fc59741 100644 --- a/src/client/component/input.cpp +++ b/src/client/component/input.cpp @@ -51,4 +51,4 @@ namespace input }; } -REGISTER_COMPONENT(input::component) \ No newline at end of file +REGISTER_COMPONENT(input::component) diff --git a/src/client/component/localized_strings.cpp b/src/client/component/localized_strings.cpp index 18a80644..975c76f3 100644 --- a/src/client/component/localized_strings.cpp +++ b/src/client/component/localized_strings.cpp @@ -18,24 +18,24 @@ namespace localized_strings const char* seh_string_ed_get_string(const char* reference) { return localized_overrides.access([&](const localized_map& map) + { + const auto entry = map.find(reference); + if (entry != map.end()) { - const auto entry = map.find(reference); - if (entry != map.end()) - { - return utils::string::va("%s", entry->second.data()); - } + return utils::string::va("%s", entry->second.data()); + } - return seh_string_ed_get_string_hook.invoke(reference); - }); + return seh_string_ed_get_string_hook.invoke(reference); + }); } } void override(const std::string& key, const std::string& value) { localized_overrides.access([&](localized_map& map) - { - map[key] = value; - }); + { + map[key] = value; + }); } class component final : public component_interface @@ -49,4 +49,4 @@ namespace localized_strings }; } -REGISTER_COMPONENT(localized_strings::component) \ No newline at end of file +REGISTER_COMPONENT(localized_strings::component) diff --git a/src/client/component/lui.cpp b/src/client/component/lui.cpp index c1284942..1407d471 100644 --- a/src/client/component/lui.cpp +++ b/src/client/component/lui.cpp @@ -15,7 +15,10 @@ namespace lui public: void post_unpack() override { - if (!game::environment::is_mp()) return; + if (!game::environment::is_mp()) + { + return; + } // Don't show create cod account popup //utils::hook::set(0x14017C957, 0); // H1(1.4) @@ -26,35 +29,35 @@ namespace lui //#endif command::add("lui_open", [](const command::params& params) + { + if (params.size() <= 1) { - if (params.size() <= 1) - { - console::info("usage: lui_open \n"); - return; - } + console::info("usage: lui_open \n"); + return; + } - game::LUI_OpenMenu(0, params[1], 0, 0, 0); - }); + game::LUI_OpenMenu(0, params[1], 0, 0, 0); + }); command::add("lui_open_popup", [](const command::params& params) + { + if (params.size() <= 1) { - if (params.size() <= 1) - { - console::info("usage: lui_open_popup \n"); - return; - } + console::info("usage: lui_open_popup \n"); + return; + } - game::LUI_OpenMenu(0, params[1], 1, 0, 0); - }); + game::LUI_OpenMenu(0, params[1], 1, 0, 0); + }); command::add("runMenuScript", [](const command::params& params) - { - const auto args_str = params.join(1); - const auto* args = args_str.data(); - game::UI_RunMenuScript(0, &args); - }); + { + const auto args_str = params.join(1); + const auto* args = args_str.data(); + game::UI_RunMenuScript(0, &args); + }); } }; } -REGISTER_COMPONENT(lui::component) \ No newline at end of file +REGISTER_COMPONENT(lui::component) diff --git a/src/client/component/map_rotation.cpp b/src/client/component/map_rotation.cpp index 9e3002e8..eec5827a 100644 --- a/src/client/component/map_rotation.cpp +++ b/src/client/component/map_rotation.cpp @@ -137,15 +137,15 @@ namespace map_rotation void trigger_map_rotation() { scheduler::schedule([]() + { + if (game::CL_IsCgameInitialized()) { - if (game::CL_IsCgameInitialized()) - { - return scheduler::cond_continue; - } + return scheduler::cond_continue; + } - command::execute("map_rotate", false); - return scheduler::cond_end; - }, scheduler::pipeline::main, 1s); + command::execute("map_rotate", false); + return scheduler::cond_end; + }, scheduler::pipeline::main, 1s); } } @@ -161,11 +161,11 @@ namespace map_rotation } scheduler::once([]() - { - dvars::register_string("sv_mapRotation", "", game::DVAR_FLAG_NONE, true); - dvars::register_string("sv_mapRotationCurrent", "", game::DVAR_FLAG_NONE, true); - dvars::register_string("sv_autoPriority", "", game::DVAR_FLAG_NONE, true); - }, scheduler::pipeline::main); + { + dvars::register_string("sv_mapRotation", "", game::DVAR_FLAG_NONE, true); + dvars::register_string("sv_mapRotationCurrent", "", game::DVAR_FLAG_NONE, true); + dvars::register_string("sv_autoPriority", "", game::DVAR_FLAG_NONE, true); + }, scheduler::pipeline::main); command::add("map_rotate", &perform_map_rotation); @@ -177,4 +177,4 @@ namespace map_rotation }; } -REGISTER_COMPONENT(map_rotation::component) \ No newline at end of file +REGISTER_COMPONENT(map_rotation::component) diff --git a/src/client/component/network.cpp b/src/client/component/network.cpp index 93999d82..6fce092c 100644 --- a/src/client/component/network.cpp +++ b/src/client/component/network.cpp @@ -276,13 +276,13 @@ namespace network // ignore built in "print" oob command and add in our own utils::hook::set(0x14025280E, 0xEB); // H1MP64(1.4) on("print", [](const game::netadr_s&, const std::string_view& data) - { - const std::string message{ data }; - console::info(message.data()); - }); + { + const std::string message{data}; + console::info(message.data()); + }); } } }; } -REGISTER_COMPONENT(network::component) \ No newline at end of file +REGISTER_COMPONENT(network::component) diff --git a/src/client/component/patches.cpp b/src/client/component/patches.cpp index 2255b585..724ed051 100644 --- a/src/client/component/patches.cpp +++ b/src/client/component/patches.cpp @@ -59,9 +59,9 @@ namespace patches // Fix mouse lag utils::hook::nop(SELECT_VALUE(0x1403E3C05, 0x1404DB1AF), 6); scheduler::loop([]() - { - SetThreadExecutionState(ES_DISPLAY_REQUIRED); - }, scheduler::pipeline::main); + { + SetThreadExecutionState(ES_DISPLAY_REQUIRED); + }, scheduler::pipeline::main); // Prevent game from overriding cg_fov and cg_fovscale values gscr_set_save_dvar_hook.create(SELECT_VALUE(0x1402AE020, 0x14036B600), &gscr_set_save_dvar_stub); @@ -75,4 +75,4 @@ namespace patches }; } -REGISTER_COMPONENT(patches::component) \ No newline at end of file +REGISTER_COMPONENT(patches::component) diff --git a/src/client/component/resources.cpp b/src/client/component/resources.cpp index 3a1592a1..2a95b18a 100644 --- a/src/client/component/resources.cpp +++ b/src/client/component/resources.cpp @@ -67,4 +67,4 @@ namespace resources }; } -REGISTER_COMPONENT(resources::component) \ No newline at end of file +REGISTER_COMPONENT(resources::component) diff --git a/src/client/component/scheduler.cpp b/src/client/component/scheduler.cpp index 3c3ac18d..a6d742d5 100644 --- a/src/client/component/scheduler.cpp +++ b/src/client/component/scheduler.cpp @@ -28,9 +28,9 @@ namespace scheduler void add(task&& task) { new_callbacks_.access([&task](task_list& tasks) - { - tasks.emplace_back(std::move(task)); - }); + { + tasks.emplace_back(std::move(task)); + }); } void execute() @@ -72,13 +72,13 @@ namespace scheduler void merge_callbacks() { callbacks_.access([&](task_list& tasks) + { + new_callbacks_.access([&](task_list& new_tasks) { - new_callbacks_.access([&](task_list& new_tasks) - { - tasks.insert(tasks.end(), std::move_iterator(new_tasks.begin()), std::move_iterator(new_tasks.end())); - new_tasks = {}; - }); + tasks.insert(tasks.end(), std::move_iterator(new_tasks.begin()), std::move_iterator(new_tasks.end())); + new_tasks = {}; }); + }); } }; @@ -131,36 +131,36 @@ namespace scheduler const std::chrono::milliseconds delay) { schedule([callback]() - { - callback(); - return cond_continue; - }, type, delay); + { + callback(); + return cond_continue; + }, type, delay); } void once(const std::function& callback, const pipeline type, const std::chrono::milliseconds delay) { schedule([callback]() - { - callback(); - return cond_end; - }, type, delay); + { + callback(); + return cond_end; + }, type, delay); } void on_game_initialized(const std::function& callback, const pipeline type, const std::chrono::milliseconds delay) { schedule([=]() + { + const auto dw_init = game::environment::is_sp() ? true : game::Live_SyncOnlineDataFlags(0) == 0; + if (dw_init && game::Sys_IsDatabaseReady2()) { - const auto dw_init = game::environment::is_sp() ? true : game::Live_SyncOnlineDataFlags(0) == 0; - if (dw_init && game::Sys_IsDatabaseReady2()) - { - once(callback, type, delay); - return cond_end; - } + once(callback, type, delay); + return cond_end; + } - return cond_continue; - }, pipeline::main); + return cond_continue; + }, pipeline::main); } class component final : public component_interface @@ -169,22 +169,20 @@ namespace scheduler void post_start() override { thread = utils::thread::create_named_thread("Async Scheduler", []() + { + while (!kill) { - while (!kill) - { - execute(pipeline::async); - std::this_thread::sleep_for(10ms); - } - }); + execute(pipeline::async); + std::this_thread::sleep_for(10ms); + } + }); } void post_unpack() override { - r_end_frame_hook.create(SELECT_VALUE(0x1404F7310, 0x1405FE470), scheduler::r_end_frame_stub); // H1(1.4) g_run_frame_hook.create(SELECT_VALUE(0x1402772D0, 0x1402772D0), scheduler::server_frame_stub); // H1(1.4) main_frame_hook.create(SELECT_VALUE(0x1401CE8D0, 0x1401CE8D0), scheduler::main_frame_stub); // H1(1.4) - } void pre_destroy() override @@ -198,4 +196,4 @@ namespace scheduler }; } -REGISTER_COMPONENT(scheduler::component) \ No newline at end of file +REGISTER_COMPONENT(scheduler::component) diff --git a/src/client/component/slowmotion.cpp b/src/client/component/slowmotion.cpp index 232ae576..71f66dbf 100644 --- a/src/client/component/slowmotion.cpp +++ b/src/client/component/slowmotion.cpp @@ -50,4 +50,4 @@ namespace slowmotion }; } -REGISTER_COMPONENT(slowmotion::component) \ No newline at end of file +REGISTER_COMPONENT(slowmotion::component) diff --git a/src/client/component/splash.cpp b/src/client/component/splash.cpp index f027cf16..79d23bd1 100644 --- a/src/client/component/splash.cpp +++ b/src/client/component/splash.cpp @@ -138,4 +138,4 @@ namespace splash }; } -REGISTER_COMPONENT(splash::component) \ No newline at end of file +REGISTER_COMPONENT(splash::component) diff --git a/src/client/component/steam_proxy.cpp b/src/client/component/steam_proxy.cpp index ff6c52a4..5fa54708 100644 --- a/src/client/component/steam_proxy.cpp +++ b/src/client/component/steam_proxy.cpp @@ -132,7 +132,7 @@ namespace steam_proxy this->client_utils_.invoke("SetAppIDForCurrentPipe", app_id, false); - char our_directory[MAX_PATH] = { 0 }; + char our_directory[MAX_PATH] = {0}; GetCurrentDirectoryA(sizeof(our_directory), our_directory); const auto path = runner_file.get_extracted_file(); @@ -171,7 +171,7 @@ namespace steam_proxy this->steam_pipe_ = nullptr; this->global_user_ = nullptr; - this->steam_client_module_ = utils::nt::library{ nullptr }; + this->steam_client_module_ = utils::nt::library{nullptr}; return scheduler::cond_end; }); @@ -185,4 +185,4 @@ namespace steam_proxy } } -REGISTER_COMPONENT(steam_proxy::component) \ No newline at end of file +REGISTER_COMPONENT(steam_proxy::component) diff --git a/src/client/component/system_check.cpp b/src/client/component/system_check.cpp index 0d32e798..9c88bd5c 100644 --- a/src/client/component/system_check.cpp +++ b/src/client/component/system_check.cpp @@ -97,4 +97,4 @@ namespace system_check }; } -REGISTER_COMPONENT(system_check::component) \ No newline at end of file +REGISTER_COMPONENT(system_check::component) diff --git a/src/client/component/thread_names.cpp b/src/client/component/thread_names.cpp index 95a3d795..84b5fa70 100644 --- a/src/client/component/thread_names.cpp +++ b/src/client/component/thread_names.cpp @@ -57,4 +57,4 @@ namespace thread_names }; } -REGISTER_COMPONENT(thread_names::component) \ No newline at end of file +REGISTER_COMPONENT(thread_names::component) diff --git a/src/client/component/videos.cpp b/src/client/component/videos.cpp index 74e37e1d..a602cc8a 100644 --- a/src/client/component/videos.cpp +++ b/src/client/component/videos.cpp @@ -52,4 +52,4 @@ namespace videos }; } -REGISTER_COMPONENT(videos::component) \ No newline at end of file +REGISTER_COMPONENT(videos::component) diff --git a/src/client/game/dvars.cpp b/src/client/game/dvars.cpp index 83f36c8a..7160e3d4 100644 --- a/src/client/game/dvars.cpp +++ b/src/client/game/dvars.cpp @@ -151,356 +151,354 @@ namespace dvars } } - - std::vector dvar_list = { - "accessToSubscriberContent", - "acousticSpikeMaxRange", - "acousticSpikeMinRadius", - "acousticSpikeMinRange", - "acousticSpikeRingSize", - "acousticSpikeSize", - "actionSlotsHide", - "activeAction", - "activeFriendsMaxBackoffLevel", - "activeFriendsNumDayBuckets", - "activeFriendsNumPlayBuckets", - "activeFriendsRefreshDelay", - "activeFriendsSecondsPerBucket", - "aim_accel_turnrate_lerp", - "aim_aimAssistRangeScale", - "aim_alternate_lockon_deflection", - "aim_alternate_lockon_pitch_strength", - "aim_alternate_lockon_region_height", - "aim_alternate_lockon_region_width", - "aim_alternate_lockon_strength", - "aim_assist_min_target_distance", - "aim_assist_script_disable", - "cg_draw2D", - "cg_drawPing", - "cg_drawBigFPS", - "cg_drawBreathHint", - "cg_drawBuildName", - "cg_drawFPS", - "cg_drawFPSLabels", - "cg_drawFPSOnly", - "cg_drawFPSScale", - "cg_drawVersion", - "cg_drawVersionX", - "cg_drawVersionY", - "cg_drawViewpos", - "cg_drawgun", - "cg_fov", - "cg_fov_default", - "cg_fov_default_thirdperson", - "cg_fovCompMax", - "cg_fovExtraCam", - "cg_fovMin", - "cg_fovScale", - "cg_legacyCrashHandling", - "cl_maxpackets", - "cl_maxPing", - "com_introPlayed", - "com_isNotice", - "com_maxclients", - "com_maxfps", - "com_maxFrameTime", - "fs_basegame", - "fs_basepath", - "fs_basepath_output", - "fs_cdpath", - "fs_copyfiles", - "fs_debug", - "fs_game", - "fs_homepath", - "fs_ignoreLocalized", - "fs_restrict", - "fs_savepath", - "fs_usedevdir", - "fs_userDocuments", - "fs_usermapdir", - "g_gametype", - "gametype", - "g_hardcore", - "g_listEntity", - "g_loadScripts", - "g_log", - "g_logSync", - "g_logTimeStampInSeconds", - "timescale", // Scale time of each frame ---> "5401" - "g_motd", - "g_scriptMainMenu", - "g_smoothClients", - "g_spawnai", - "g_speed", - "gamedate", - "gamedvr_active", - "gameMode", - "gamename", - "log_party_state", - "logfile", - "m_filter", - "m_forward", - "m_pitch", - "m_side", - "m_yaw", - "r_drawLightmapDrawlists", - "r_drawLitDrawlists", - "r_drawSun", - "r_drawWater", - "r_fog", - "r_fog_depthhack_scale", - "r_fog_disable", - "r_fog_ev_adjust", - "r_fogBaseDist", - "r_fogBaseHeight", - "r_fogColor", - "r_fogHalfDist", - "r_fogHalfHeight", - "r_fogOpacity", - "r_fogSunColor", - "r_fogSunInner", - "r_fogSunOpacity", - "r_fogSunOuter", - "r_fogSunPitch", - "r_fogSunYaw", - "r_fogTweak", - "r_forceLod", - "r_fullbright", - "r_fullPrepass", - "r_fullscreen", - "r_fullscreenWindow", - "r_fxaa", - "r_fxaaSubpixel", - "r_FXAverageColorFunc", - "r_gamma", - "r_glossMap", - "r_glow", - "r_glow_allowed", - "stat_version", - "stats_version_check", - "statsLocationFatal", - "stopspeed", - "storeMapPackMaskToStats", - "stringtable_debug", - "sv_allowAnonymous", - "sv_allowClientConsole", - "sv_allowDownload", - "sv_allowedClan1", - "sv_allowedClan2", - "sv_archiveClientsPositions", - "sv_assistWorkers", - "sv_authenticating", - "sv_bitfieldTracking", - "sv_botsPressAttackBtn", - "sv_cheats", - "sv_checkMinPlayers", - "sv_clientArchive", - "sv_clientFpsLimit", - "sv_clientside", - "sv_clientSideBullets", - "sv_clientSideVehicles", - "sv_connectTimeout", - "sv_cumulThinkTime", - "sv_debugRate", - "sv_debugReliableCmds", - "sv_disableClientConsole", - "sv_dwlsgerror", - "sv_endGameIfISuck", - "sv_error_on_baseline_failure", - "sv_expensive_bullet_time", - "sv_exponentialBackoffAfterNonAckedMsgs", - "sv_externalEventLoop", - "sv_FakeRemoteClient", - "sv_fakeServerLoad", - "sv_fakeServerLoadRand", - "sv_FFCheckSums", - "sv_FFNames", - "sv_floodprotect", - "sv_forceunranked", - "sv_fps", - "sv_hostname", - "sv_hugeSnapshotDelay", - "sv_hugeSnapshotSize", - "sv_iwdNames", - "sv_iwds", - "sv_keywords", - "sv_kickBanTime", - "sv_lastSaveCommitedToDevice", - "sv_local_client_snapshot_msec", - "sv_mapname", - "mapname", - "sv_mapRotation", - "sv_mapRotationCurrent", - "cl_maxpackets", - "sv_maxclients", - "sv_maxPhysExplosionSpheres", - "sv_maxPing", - "sv_maxRate", - "sv_minPing", - "sv_minPingClamp", - "sv_network_fps", - "sv_networkRateSolution", - "sv_noname", - "sv_NoShapshotWarnings", - "sv_numExpBackoffBeforeReleasingCachedSnapshots", - "sv_packet_info", - "sv_padPackets", - "sv_paused", - "sv_playlistFetchInterval", - "sv_privateClients", - "sv_privateClientsForClients", - "sv_privatePassword", - "sv_punkbuster", - "sv_pure", - "sv_reconnectlimit", - "sv_referencedFFCheckSums", - "sv_referencedFFNames", - "sv_referencedIwdNames", - "sv_referencedIwds", - "sv_rejoinTimeout", - "sv_remote_client_snapshot_joiningstate_msec", - "sv_remote_client_snapshot_msec", - "sv_resetOnSpawn", - "sv_restrictedTempEnts", - "sv_rewindPoseArchive", - "sv_running", - "sv_saveDeviceAvailable", - "sv_saveGameAvailable", - "sv_saveGameNotReadable", - "sv_saveOnStartMap", - "sv_serverid", - "sv_showAverageBPS", - "sv_showCommands", - "sv_smp", - "sv_SnapshotManLaw", - "sv_testValue", - "sv_timeout", - "sv_trackFrameMsecThreshold", - "sv_useExtraCompress", - "sv_voice", - "sv_voiceQuality", - "sv_writeConfigStrings", - "sv_wwwBaseURL", - "sv_wwwDlDisconnected", - "sv_wwwDownload", - "sv_zlib_threshold", - "sv_zombietime", - "sv_mapRotation", - "sv_mapRotationCurrent", - "sv_autoPriority", - //"xpartygo", - "svwp", - "syncTimeTimeout", - "sys_configSum", - "sys_configureGHz", - "sys_cpuGHz", - "sys_cpuName", - "sys_gpu", - "sys_lockThreads", - "sys_quitMigrateTime", - "sys_smp_allowed", - "sys_SSE", - "sys_sysMB", - "systemlink", - "systemlink_host", - "bot_AllowGrenades", - "bot_autoconnectdefault", - "bot_CloseDistance", - "bot_CrouchDistance", - "bot_difficulty", - "bot_difficultydefault", - "bot_enemies", - "bot_Fov", - "bot_friends", - "bot_GoalRadius", - "bot_MaxAdsTime", - "bot_MaxCrouchTime", - "bot_MaxDeathTime", - "bot_MaxFireTime", - "bot_MaxGrenadeTime", - "bot_MaxPitchTime", - "bot_MaxReactionTime", - "bot_MaxStrafeTime", - "bot_MeleeDist", - "bot_MinAdsTime", - "bot_MinCrouchTime", - "bot_MinDeathTime", - "bot_MinFireTime", - "bot_MinGrenadeTime", - "bot_MinPitchTime", - "bot_MinReactionTime", - "bot_MinStrafeTime", - "bot_PitchDown", - "bot_PitchSpeed", - "bot_PitchSpeedAds", - "bot_PitchUp", - "bot_SprintDistance", - "bot_StrafeChance", - "bot_TargetLeadBias", - "bot_tips", - "bot_UseFriendNames", - "bot_YawSpeed", - "bot_YawSpeedAds", - "custom_roundlimit", - "custom_scorelimit", - "custom_scr_allowannouncer", - "custom_scr_allowbattlechatter", - "custom_scr_bot_difficulty", - "custom_scr_ctf_enemycarriervisible", - "custom_scr_ctf_idleflagreturntime", - "custom_scr_ctf_roundswitch", - "custom_scr_ctf_touchreturn", - "custom_scr_custom_score_assist", - "custom_scr_dem_bombtimer", - "custom_scr_dem_defusetime", - "custom_scr_dem_extratime", - "custom_scr_dem_planttime", - "custom_scr_dem_roundswitch", - "custom_scr_dm_bonus_leader", - "custom_scr_dm_score_assist", - "custom_scr_dm_score_death", - "custom_scr_dm_score_headshot", - "custom_scr_dm_score_kill", - "custom_scr_dm_score_suicide", - "custom_scr_dom_flagcapturetime", - "custom_scr_game_allowkillcam", - "custom_scr_game_forceradar", - "custom_scr_game_hardpoints", - "custom_scr_game_onlyheadshots", - "custom_scr_game_perks", - "custom_scr_game_spectatetype", - "custom_scr_hardcore", - "custom_scr_num_bots", - "custom_scr_num_bots_enemy", - "custom_scr_num_bots_friendly", - "custom_scr_player_forcerespawn", - "custom_scr_player_healthregentime", - "custom_scr_player_maxhealth", - "custom_scr_player_sprintTime", - "custom_scr_rcbomb_notimeout", - "custom_scr_sab_bombtimer", - "custom_scr_sab_defusetime", - "custom_scr_sab_hotpotato", - "custom_scr_sab_planttime", - "custom_scr_sab_roundswitch", - "custom_scr_sd_bombtimer", - "custom_scr_sd_defusetime", - "custom_scr_sd_multibomb", - "custom_scr_sd_planttime", - "custom_scr_sd_roundswitch", - "custom_scr_tdm_bonus_leader", - "custom_scr_tdm_score_death", - "custom_scr_tdm_score_headshot", - "custom_scr_tdm_score_kill", - "custom_scr_tdm_score_suicide", - "custom_scr_team_fftype", - "custom_scr_team_teamkillspawndelay", - "custom_scr_vehicles_enabled", - "name", - "custom_timelimit", - "map" + "accessToSubscriberContent", + "acousticSpikeMaxRange", + "acousticSpikeMinRadius", + "acousticSpikeMinRange", + "acousticSpikeRingSize", + "acousticSpikeSize", + "actionSlotsHide", + "activeAction", + "activeFriendsMaxBackoffLevel", + "activeFriendsNumDayBuckets", + "activeFriendsNumPlayBuckets", + "activeFriendsRefreshDelay", + "activeFriendsSecondsPerBucket", + "aim_accel_turnrate_lerp", + "aim_aimAssistRangeScale", + "aim_alternate_lockon_deflection", + "aim_alternate_lockon_pitch_strength", + "aim_alternate_lockon_region_height", + "aim_alternate_lockon_region_width", + "aim_alternate_lockon_strength", + "aim_assist_min_target_distance", + "aim_assist_script_disable", + "cg_draw2D", + "cg_drawPing", + "cg_drawBigFPS", + "cg_drawBreathHint", + "cg_drawBuildName", + "cg_drawFPS", + "cg_drawFPSLabels", + "cg_drawFPSOnly", + "cg_drawFPSScale", + "cg_drawVersion", + "cg_drawVersionX", + "cg_drawVersionY", + "cg_drawViewpos", + "cg_drawgun", + "cg_fov", + "cg_fov_default", + "cg_fov_default_thirdperson", + "cg_fovCompMax", + "cg_fovExtraCam", + "cg_fovMin", + "cg_fovScale", + "cg_legacyCrashHandling", + "cl_maxpackets", + "cl_maxPing", + "com_introPlayed", + "com_isNotice", + "com_maxclients", + "com_maxfps", + "com_maxFrameTime", + "fs_basegame", + "fs_basepath", + "fs_basepath_output", + "fs_cdpath", + "fs_copyfiles", + "fs_debug", + "fs_game", + "fs_homepath", + "fs_ignoreLocalized", + "fs_restrict", + "fs_savepath", + "fs_usedevdir", + "fs_userDocuments", + "fs_usermapdir", + "g_gametype", + "gametype", + "g_hardcore", + "g_listEntity", + "g_loadScripts", + "g_log", + "g_logSync", + "g_logTimeStampInSeconds", + "timescale", // Scale time of each frame ---> "5401" + "g_motd", + "g_scriptMainMenu", + "g_smoothClients", + "g_spawnai", + "g_speed", + "gamedate", + "gamedvr_active", + "gameMode", + "gamename", + "log_party_state", + "logfile", + "m_filter", + "m_forward", + "m_pitch", + "m_side", + "m_yaw", + "r_drawLightmapDrawlists", + "r_drawLitDrawlists", + "r_drawSun", + "r_drawWater", + "r_fog", + "r_fog_depthhack_scale", + "r_fog_disable", + "r_fog_ev_adjust", + "r_fogBaseDist", + "r_fogBaseHeight", + "r_fogColor", + "r_fogHalfDist", + "r_fogHalfHeight", + "r_fogOpacity", + "r_fogSunColor", + "r_fogSunInner", + "r_fogSunOpacity", + "r_fogSunOuter", + "r_fogSunPitch", + "r_fogSunYaw", + "r_fogTweak", + "r_forceLod", + "r_fullbright", + "r_fullPrepass", + "r_fullscreen", + "r_fullscreenWindow", + "r_fxaa", + "r_fxaaSubpixel", + "r_FXAverageColorFunc", + "r_gamma", + "r_glossMap", + "r_glow", + "r_glow_allowed", + "stat_version", + "stats_version_check", + "statsLocationFatal", + "stopspeed", + "storeMapPackMaskToStats", + "stringtable_debug", + "sv_allowAnonymous", + "sv_allowClientConsole", + "sv_allowDownload", + "sv_allowedClan1", + "sv_allowedClan2", + "sv_archiveClientsPositions", + "sv_assistWorkers", + "sv_authenticating", + "sv_bitfieldTracking", + "sv_botsPressAttackBtn", + "sv_cheats", + "sv_checkMinPlayers", + "sv_clientArchive", + "sv_clientFpsLimit", + "sv_clientside", + "sv_clientSideBullets", + "sv_clientSideVehicles", + "sv_connectTimeout", + "sv_cumulThinkTime", + "sv_debugRate", + "sv_debugReliableCmds", + "sv_disableClientConsole", + "sv_dwlsgerror", + "sv_endGameIfISuck", + "sv_error_on_baseline_failure", + "sv_expensive_bullet_time", + "sv_exponentialBackoffAfterNonAckedMsgs", + "sv_externalEventLoop", + "sv_FakeRemoteClient", + "sv_fakeServerLoad", + "sv_fakeServerLoadRand", + "sv_FFCheckSums", + "sv_FFNames", + "sv_floodprotect", + "sv_forceunranked", + "sv_fps", + "sv_hostname", + "sv_hugeSnapshotDelay", + "sv_hugeSnapshotSize", + "sv_iwdNames", + "sv_iwds", + "sv_keywords", + "sv_kickBanTime", + "sv_lastSaveCommitedToDevice", + "sv_local_client_snapshot_msec", + "sv_mapname", + "mapname", + "sv_mapRotation", + "sv_mapRotationCurrent", + "cl_maxpackets", + "sv_maxclients", + "sv_maxPhysExplosionSpheres", + "sv_maxPing", + "sv_maxRate", + "sv_minPing", + "sv_minPingClamp", + "sv_network_fps", + "sv_networkRateSolution", + "sv_noname", + "sv_NoShapshotWarnings", + "sv_numExpBackoffBeforeReleasingCachedSnapshots", + "sv_packet_info", + "sv_padPackets", + "sv_paused", + "sv_playlistFetchInterval", + "sv_privateClients", + "sv_privateClientsForClients", + "sv_privatePassword", + "sv_punkbuster", + "sv_pure", + "sv_reconnectlimit", + "sv_referencedFFCheckSums", + "sv_referencedFFNames", + "sv_referencedIwdNames", + "sv_referencedIwds", + "sv_rejoinTimeout", + "sv_remote_client_snapshot_joiningstate_msec", + "sv_remote_client_snapshot_msec", + "sv_resetOnSpawn", + "sv_restrictedTempEnts", + "sv_rewindPoseArchive", + "sv_running", + "sv_saveDeviceAvailable", + "sv_saveGameAvailable", + "sv_saveGameNotReadable", + "sv_saveOnStartMap", + "sv_serverid", + "sv_showAverageBPS", + "sv_showCommands", + "sv_smp", + "sv_SnapshotManLaw", + "sv_testValue", + "sv_timeout", + "sv_trackFrameMsecThreshold", + "sv_useExtraCompress", + "sv_voice", + "sv_voiceQuality", + "sv_writeConfigStrings", + "sv_wwwBaseURL", + "sv_wwwDlDisconnected", + "sv_wwwDownload", + "sv_zlib_threshold", + "sv_zombietime", + "sv_mapRotation", + "sv_mapRotationCurrent", + "sv_autoPriority", + //"xpartygo", + "svwp", + "syncTimeTimeout", + "sys_configSum", + "sys_configureGHz", + "sys_cpuGHz", + "sys_cpuName", + "sys_gpu", + "sys_lockThreads", + "sys_quitMigrateTime", + "sys_smp_allowed", + "sys_SSE", + "sys_sysMB", + "systemlink", + "systemlink_host", + "bot_AllowGrenades", + "bot_autoconnectdefault", + "bot_CloseDistance", + "bot_CrouchDistance", + "bot_difficulty", + "bot_difficultydefault", + "bot_enemies", + "bot_Fov", + "bot_friends", + "bot_GoalRadius", + "bot_MaxAdsTime", + "bot_MaxCrouchTime", + "bot_MaxDeathTime", + "bot_MaxFireTime", + "bot_MaxGrenadeTime", + "bot_MaxPitchTime", + "bot_MaxReactionTime", + "bot_MaxStrafeTime", + "bot_MeleeDist", + "bot_MinAdsTime", + "bot_MinCrouchTime", + "bot_MinDeathTime", + "bot_MinFireTime", + "bot_MinGrenadeTime", + "bot_MinPitchTime", + "bot_MinReactionTime", + "bot_MinStrafeTime", + "bot_PitchDown", + "bot_PitchSpeed", + "bot_PitchSpeedAds", + "bot_PitchUp", + "bot_SprintDistance", + "bot_StrafeChance", + "bot_TargetLeadBias", + "bot_tips", + "bot_UseFriendNames", + "bot_YawSpeed", + "bot_YawSpeedAds", + "custom_roundlimit", + "custom_scorelimit", + "custom_scr_allowannouncer", + "custom_scr_allowbattlechatter", + "custom_scr_bot_difficulty", + "custom_scr_ctf_enemycarriervisible", + "custom_scr_ctf_idleflagreturntime", + "custom_scr_ctf_roundswitch", + "custom_scr_ctf_touchreturn", + "custom_scr_custom_score_assist", + "custom_scr_dem_bombtimer", + "custom_scr_dem_defusetime", + "custom_scr_dem_extratime", + "custom_scr_dem_planttime", + "custom_scr_dem_roundswitch", + "custom_scr_dm_bonus_leader", + "custom_scr_dm_score_assist", + "custom_scr_dm_score_death", + "custom_scr_dm_score_headshot", + "custom_scr_dm_score_kill", + "custom_scr_dm_score_suicide", + "custom_scr_dom_flagcapturetime", + "custom_scr_game_allowkillcam", + "custom_scr_game_forceradar", + "custom_scr_game_hardpoints", + "custom_scr_game_onlyheadshots", + "custom_scr_game_perks", + "custom_scr_game_spectatetype", + "custom_scr_hardcore", + "custom_scr_num_bots", + "custom_scr_num_bots_enemy", + "custom_scr_num_bots_friendly", + "custom_scr_player_forcerespawn", + "custom_scr_player_healthregentime", + "custom_scr_player_maxhealth", + "custom_scr_player_sprintTime", + "custom_scr_rcbomb_notimeout", + "custom_scr_sab_bombtimer", + "custom_scr_sab_defusetime", + "custom_scr_sab_hotpotato", + "custom_scr_sab_planttime", + "custom_scr_sab_roundswitch", + "custom_scr_sd_bombtimer", + "custom_scr_sd_defusetime", + "custom_scr_sd_multibomb", + "custom_scr_sd_planttime", + "custom_scr_sd_roundswitch", + "custom_scr_tdm_bonus_leader", + "custom_scr_tdm_score_death", + "custom_scr_tdm_score_headshot", + "custom_scr_tdm_score_kill", + "custom_scr_tdm_score_suicide", + "custom_scr_team_fftype", + "custom_scr_team_teamkillspawndelay", + "custom_scr_vehicles_enabled", + "name", + "custom_timelimit", + "map" }; bool can_add_dvar_to_list(std::string name) @@ -581,7 +579,8 @@ namespace dvars return game::Dvar_RegisterVec4(hash, "", x, y, z, w, min, max, flags); } - namespace override { + namespace override + { static std::unordered_map set_string_overrides; game::dvar_t* register_int(const std::string& name, int value, int min, int max, diff --git a/src/client/game/dvars.hpp b/src/client/game/dvars.hpp index 9eedb7a7..0a2a84ca 100644 --- a/src/client/game/dvars.hpp +++ b/src/client/game/dvars.hpp @@ -34,7 +34,8 @@ namespace dvars game::dvar_t* register_float(const std::string& name, float value, float min, float max, game::DvarFlags flags, bool add_to_list = true); game::dvar_t* register_vec4(const std::string& name, float x, float y, float z, float w, float min, float max, game::DvarFlags flags, bool add_to_list = true); - namespace override { + namespace override + { game::dvar_t* register_int(const std::string& name, int value, int min, int max, const unsigned int flags, bool add_to_list = true); void Dvar_SetString(const std::string& name, const std::string& string); game::dvar_t* register_float(const std::string& name, float value, float min, float max, game::DvarFlags flags, bool add_to_list = true); diff --git a/src/client/game/game.cpp b/src/client/game/game.cpp index dfb601c9..d47c6bc2 100644 --- a/src/client/game/game.cpp +++ b/src/client/game/game.cpp @@ -23,7 +23,6 @@ namespace game return sv_cmd_args->argv[sv_cmd_args->nesting][index]; } - namespace environment { launcher::mode mode = launcher::mode::none; diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 8baaf149..33646e3e 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -8,238 +8,221 @@ namespace game * Functions **************************************************************/ - WEAK symbol Cbuf_AddText{ 0x140342EB0, 0x1404033B0 }; // H1(1.4) - WEAK symbol Cmd_ExecuteSingleCommand{ 0x140343980, 0x140343980 }; // H1SP64[CODEX] + WEAK symbol BG_GetWeaponNameComplete{0, 0x140165580}; - WEAK symbol Cmd_AddCommandInternal{ 0x1403433E0, 0x140403950 }; // H1(1.4) + WEAK symbol Cbuf_AddText{0x140342EB0, 0x1404033B0}; // H1(1.4) + WEAK symbol Conbuf_AppendText{0x1403E3300, 0x140513FF0}; // H1(1.4) + WEAK symbol Cmd_ExecuteSingleCommand{0x140343980, 0x140343980}; // H1SP64[CODEX] + WEAK symbol Cmd_AddCommandInternal{0x1403433E0, 0x140403950}; // H1(1.4) + WEAK symbol Cmd_TokenizeString{0x140344110, 0x1404046F0}; // H1(1.4) + WEAK symbol Cmd_EndTokenizeString{0x140343630, 0x140403C20}; // H1(1.4) - WEAK symbol Com_Frame_Try_Block_Function{ 0, 0x1400D8310 }; //H1MP MWR TEST + WEAK symbol Com_Frame_Try_Block_Function{0, 0x1400D8310}; //H1MP MWR TEST + WEAK symbol Com_GetCurrentCoDPlayMode{0, 0x1405039A0}; // H1(1.4) + WEAK symbol Com_SetSlowMotion{0, 0x1400DB790}; // H1(1.4) + WEAK symbol Com_Error{0x1403509C0, 0x1400D78A0}; // H1(1.4) + WEAK symbol Com_Quit_f{0x140352BE0, 0x1400DA830}; // H1(1.4) - WEAK symbol Com_GetCurrentCoDPlayMode{ 0, 0x1405039A0 }; // H1(1.4) + WEAK symbol Key_KeynumToString{0x140187CC0, 0x14024FE10}; // H1(1.4) - WEAK symbol Com_SetSlowMotion{ 0, 0x1400DB790 }; // H1(1.4) + WEAK symbol CG_GameMessage{0x1401389A0, 0x140220CC0}; // H1(1.4) + WEAK symbol CG_GameMessageBold{0x140138750, 0x140220620}; // H1(1.4) - WEAK symbol BG_GetWeaponNameComplete{ 0, 0x140165580 }; + WEAK symbol Dvar_SetCommand{0x1403C72B0, 0x1404FD0A0}; // H1(1.4) + WEAK symbol Dvar_FindVar{0x1403C5D50, 0x1404FBB00}; // H1(1.4) + WEAK symbol Dvar_GetCombinedString{0x140354DF0, 0x14041D830}; // H1(1.4) + //WEAK symbol Dvar_ValueToString{0x1403C8560,0x1404FE660}; // H1(1.4); different typedef from previous titles + WEAK symbol Dvar_ValueToString{0x1403C8560, 0x1404FE660}; // H1(1.4) + //WEAK symbol Dvar_SetCommand{0, 0x1404FD0A0}; // H1(1.4) - WEAK symbol Com_Quit_f{ 0x140352BE0, 0x1400DA830 }; // H1(1.4) + WEAK symbol Dvar_RegisterBool{0x1403C47E0,0x1404FA540}; // H1 + WEAK symbol Dvar_RegisterInt{0x1403C4CC0, 0x1404FAA20}; // H1 + WEAK symbol Dvar_RegisterFloat{0x1403C4BB0,0x1404FA910}; // H1(1.4) + WEAK symbol Dvar_RegisterString{0x1403C4DA0,0x1404FAB00}; // H1(1.4) + WEAK symbol Dvar_RegisterVec4{0x1403C5220, 0x1404FAF40}; // H1(1.4) + WEAK symbol Dvar_RegisterEnum{0x1403C4AC0, 0x1404C0EC0}; // H1(1.4) - WEAK symbol Key_KeynumToString{ 0x140187CC0, 0x14024FE10 }; // H1(1.4) + WEAK symbol Scr_GetFloat{0x140374D20, 0x140442D10}; // H1(1.4) + WEAK symbol Scr_GetNumParam{0x140374F30, 0x140442E70}; // H1(1.4) - WEAK symbol Cmd_TokenizeString{ 0x140344110, 0x1404046F0 }; // H1(1.4) + WEAK symbol FS_ReadFile{0x1403B9020, 0x1404EE720}; // H1(1.4) + WEAK symbol FS_FreeFile{0x1403B9010, 0x1404EE710}; // H1(1.4) + WEAK symbol FS_Startup{0x1403B85D0, 0x1404EDD30}; // H1(1.4) + WEAK symbol FS_AddLocalizedGameDirectory{0x1403B6030, 0x1404EBE20}; // H1(1.4) - WEAK symbol Dvar_SetCommand{ 0x1403C72B0, 0x1404FD0A0 }; // H1(1.4) + WEAK symbol generateHashValue{0x1400FE8A0, 0x1401B1010}; // H1(1.4) - WEAK symbol Com_Error{ 0x1403509C0, 0x1400D78A0 }; // H1(1.4) + WEAK symbol CL_IsCgameInitialized{0x14017EE30, 0x140245650}; // H1(1.4) + WEAK symbol Live_SyncOnlineDataFlags{0, 0x14059A700}; // H1(1.4) - WEAK symbol CG_GameMessage{ 0x1401389A0, 0x140220CC0 }; // H1(1.4) - WEAK symbol CG_GameMessageBold{ 0x140138750, 0x140220620 }; // H1(1.4) - WEAK symbol Conbuf_AppendText{ 0x1403E3300, 0x140513FF0 }; // H1(1.4) + WEAK symbol Sys_Milliseconds{0x1403E2B10, 0x140513710}; // H1(1.4) + WEAK symbol Sys_IsDatabaseReady2{0, 0x14042B090}; // H1(1.4) - WEAK symbol Cmd_EndTokenizeString{ 0x140343630, 0x140403C20 }; // H1(1.4) + WEAK symbol SV_DirectConnect{0, 0x140480860}; // H1(1.4) + WEAK symbol SV_Cmd_TokenizeString{0x1402EF050, 0x140404D20}; // H1(1.4) + WEAK symbol SV_Cmd_EndTokenizedString{0x140344700, 0x140404CE0}; // H1(1.4) - WEAK symbol Dvar_FindVar{ 0x1403C5D50, 0x1404FBB00 }; // H1(1.4) - WEAK symbol Dvar_GetCombinedString{ 0x140354DF0, 0x14041D830 }; // H1(1.4) - //WEAK symbol Dvar_ValueToString{ 0x1403C8560,0x1404FE660 }; // H1(1.4); different typedef from previous titles - WEAK symbol Dvar_ValueToString{ 0x1403C8560, 0x1404FE660 }; // H1(1.4) - //WEAK symbol Dvar_SetCommand{ 0, 0x1404FD0A0 }; // H1(1.4) + WEAK symbol Sys_SendPacket{0x1403E2820, 0x1405133B0}; // H1(1.4) - WEAK symbol Dvar_RegisterBool{ 0x1403C47E0,0x1404FA540 }; // H1 - WEAK symbol Dvar_RegisterInt{ 0x1403C4CC0, 0x1404FAA20 }; // H1 - WEAK symbol Dvar_RegisterFloat{ 0x1403C4BB0,0x1404FA910 }; // H1(1.4) - WEAK symbol Dvar_RegisterString{ 0x1403C4DA0,0x1404FAB00 }; // H1(1.4) - WEAK symbol Dvar_RegisterVec4{ 0x1403C5220, 0x1404FAF40 }; // H1(1.4) - WEAK symbol Dvar_RegisterEnum{ 0x1403C4AC0, 0x1404C0EC0 }; // H1(1.4) + WEAK symbol NetadrToSockadr{0x1403C11C0, 0x1404F62F0}; // H1(1.4) + WEAK symbol NET_OutOfBandPrint{0x140357560, 0x1404255D0}; // H1(1.4) + WEAK symbol NET_SendLoopPacket{0, 0x140425790}; // H1(1.4) - WEAK symbol Scr_GetFloat{ 0x140374D20, 0x140442D10 }; // H1(1.4) + WEAK symbol I_CleanStr{0x1403CD230, 0}; // H1(1.4) + WEAK symbol ScrPlace_GetViewPlacement{0x1401981F0, 0x140288550}; // H1(1.4) - WEAK symbol Scr_GetNumParam{ 0x140374F30, 0x140442E70 }; // H1(1.4) - - WEAK symbol FS_ReadFile{ 0x1403B9020, 0x1404EE720 }; // H1(1.4) - - WEAK symbol FS_FreeFile{ 0x1403B9010, 0x1404EE710 }; // H1(1.4) - - WEAK symbol FS_Startup{ 0x1403B85D0, 0x1404EDD30 }; // H1(1.4) - - WEAK symbol FS_AddLocalizedGameDirectory{ 0x1403B6030, 0x1404EBE20 }; // H1(1.4) - - WEAK symbol generateHashValue{ 0x1400FE8A0, 0x1401B1010 }; // H1(1.4) - - WEAK symbol CL_IsCgameInitialized{ 0x14017EE30, 0x140245650 }; // H1(1.4) - WEAK symbol Live_SyncOnlineDataFlags{ 0, 0x14059A700 }; // H1(1.4) - - WEAK symbol Sys_Milliseconds{ 0x1403E2B10, 0x140513710 }; // H1(1.4) - WEAK symbol Sys_IsDatabaseReady2{ 0, 0x14042B090 }; // H1(1.4) - - WEAK symbol SV_DirectConnect{ 0, 0x140480860 }; // H1(1.4) - - WEAK symbol SV_Cmd_TokenizeString{ 0x1402EF050, 0x140404D20 }; // H1(1.4) - - WEAK symbol SV_Cmd_EndTokenizedString{ 0x140344700, 0x140404CE0 }; // H1(1.4) - - WEAK symbol Sys_SendPacket{ 0x1403E2820, 0x1405133B0 }; // H1(1.4) - - WEAK symbol NetadrToSockadr{ 0x1403C11C0, 0x1404F62F0 }; // H1(1.4) - - WEAK symbol NET_OutOfBandPrint{ 0x140357560, 0x1404255D0 }; // H1(1.4) - - WEAK symbol query_socket{ 0, 0x14DDFBF98 }; // H1(1.4) - - WEAK symbol NET_SendLoopPacket{ 0, 0x140425790 }; // H1(1.4) - - WEAK symbol I_CleanStr{ 0x1403CD230, 0 }; // H1(1.4) - WEAK symbol ScrPlace_GetViewPlacement{ 0x1401981F0, 0x140288550 }; // H1(1.4) - - WEAK symbol Material_RegisterHandle{ 0x1404E48B0, 0x1405EAB30 }; // H1(1.4) + WEAK symbol Material_RegisterHandle{0x1404E48B0, 0x1405EAB30}; // H1(1.4) WEAK symbol R_AddCmdDrawStretchPic{ 0x14017E5C0, 0x1402443A0 }; // H1(1.4) + float* color, Material* material)> R_AddCmdDrawStretchPic{0x14017E5C0, 0x1402443A0}; // H1(1.4) - WEAK symbol R_RegisterFont{ 0x1404D4100, 0x1405D91E0 }; // H1(1.4) - WEAK symbol R_GetFontHeight{ 0x1405EA360, 0x1405D92C0 }; // H1(1.4) - WEAK symbol JUST_DO_OUR_DIRTY_WORK{ 0x1404D37B0, 0x1405D8890 }; // H1(1.4) + WEAK symbol R_RegisterFont{0x1404D4100, 0x1405D91E0}; // H1(1.4) + WEAK symbol R_GetFontHeight{0x1405EA360, 0x1405D92C0}; // H1(1.4) + WEAK symbol JUST_DO_OUR_DIRTY_WORK{0x1404D37B0, 0x1405D8890}; // H1(1.4) - WEAK symbol G_GetClientScore{ 0, 0x140342F90 }; // H1(1.4) - WEAK symbol SV_GetGuid{ 0, 0x140484B90 }; // H1(1.4) - WEAK symbol SV_GetClientPing{ 0, 0x140484B70 }; // H1(1.4) - WEAK symbol SV_GetPlayerstateForClientNum{ 0x1404426D0, 0 }; // H1SP(1.4) + WEAK symbol G_GetClientScore{0, 0x140342F90}; // H1(1.4) + WEAK symbol SV_GetGuid{0, 0x140484B90}; // H1(1.4) + WEAK symbol SV_GetClientPing{0, 0x140484B70}; // H1(1.4) + WEAK symbol SV_GetPlayerstateForClientNum{0x1404426D0, 0}; // H1SP(1.4) WEAK symbol H1_AddBaseDrawTextCmd{ 0x1404F3DC0,0x1405FB1F0 }; // H1(1.4) + float rotation, float* color, int style, int cursor_pos, char cursor_char, void* style_unk)> H1_AddBaseDrawTextCmd{0x1404F3DC0,0x1405FB1F0}; // H1(1.4) #define R_AddCmdDrawText(TXT,MC,F,X,Y,XS,YS,R,C,S) H1_AddBaseDrawTextCmd(TXT,MC,F,game::R_GetFontHeight(F),X,Y,XS,YS,R,C,S,-1,0,game::JUST_DO_OUR_DIRTY_WORK(S)) #define R_AddCmdDrawTextWithCursor(TXT,MC,F,UNK,X,Y,XS,YS,R,C,S,CP,CC) H1_AddBaseDrawTextCmd(TXT,MC,F,game::R_GetFontHeight(F),X,Y,XS,YS,R,C,S,CP,CC,game::JUST_DO_OUR_DIRTY_WORK(S)) - WEAK symbol R_TextWidth{ 0x1404D43B0, 0x1405D94A0 }; // H1(1.4) + WEAK symbol R_TextWidth{0x1404D43B0, 0x1405D94A0}; // H1(1.4) - WEAK symbol cmd_functions{ 0x14AD99AB8,0x14946BAC8 }; // H1(1.4) - WEAK symbol keyCatchers{ 0x14243DAF0,0x142D0BA9C }; // H1(1.4) - WEAK symbol playerKeys{ 0x1422A873C,0x142C19AFC }; // H1(1.4) - WEAK symbol cmd_args{ 0x14AD99960, 0x14946B970 }; // H1(1.4) + WEAK symbol cmd_functions{0x14AD99AB8,0x14946BAC8}; // H1(1.4) + WEAK symbol keyCatchers{0x14243DAF0,0x142D0BA9C}; // H1(1.4) + WEAK symbol playerKeys{0x1422A873C,0x142C19AFC}; // H1(1.4) + WEAK symbol cmd_args{0x14AD99960, 0x14946B970}; // H1(1.4) + WEAK symbol query_socket{0, 0x14DDFBF98}; // H1(1.4) //########################################################################################################################################################################### //########################################################################################################################################################################### //########################################################################################################################################################################### - WEAK symbol G_Glass_Update{ 0, 0x14033A640 }; // H1(1.4) - - WEAK symbol AddRefToValue{ 0, 0x1405C0EB0 }; - WEAK symbol AddRefToObject{ 0,0x1405C0EA0 }; - WEAK symbol AllocThread{ 0,0x1405C1200 }; - WEAK symbol RemoveRefToValue{ 0, 0x1405C29B0 }; - WEAK symbol RemoveRefToObject{ 0,0x1405C28A0 }; + WEAK symbol G_Glass_Update{0, 0x14033A640}; // H1(1.4) + WEAK symbol AddRefToValue{0, 0x1405C0EB0}; + WEAK symbol AddRefToObject{0,0x1405C0EA0}; + WEAK symbol AllocThread{0,0x1405C1200}; + WEAK symbol RemoveRefToValue{0, 0x1405C29B0}; + WEAK symbol RemoveRefToObject{0,0x1405C28A0}; WEAK symbol - DB_EnumXAssets_Internal{ 0, 0x1404129F0 }; - WEAK symbol DB_GetXAssetName{ 0,0x1403E4090 }; - WEAK symbol DB_LoadXAssets{ 0,0x140414FF0 }; - WEAK symbol DB_FindXAssetHeader{ 0, 0x140412F60 }; - WEAK symbol DB_GetRawFileLen{ 0,0x140413D80 }; - WEAK symbol DB_GetRawBuffer{ 0,0x140413C40 }; - WEAK symbol DB_GetXAssetTypeSize{ 0x14019A3B0, 0x14028BE70 }; // H1(1.4) + DB_EnumXAssets_Internal{0, 0x1404129F0}; + WEAK symbol DB_GetXAssetName{0,0x1403E4090}; + WEAK symbol DB_LoadXAssets{0,0x140414FF0}; + WEAK symbol DB_FindXAssetHeader{0, 0x140412F60}; + WEAK symbol DB_GetRawFileLen{0,0x140413D80}; + WEAK symbol DB_GetRawBuffer{0,0x140413C40}; + WEAK symbol DB_GetXAssetTypeSize{0x14019A3B0, 0x14028BE70}; // H1(1.4) - WEAK symbol FindVariable{ 0,0x1405C1D50 }; - WEAK symbol FindEntityId{ 0, 0x1405C1C50 }; - WEAK symbol GetEntityFieldValue{ 0, 0x1405C6100 }; + WEAK symbol FindVariable{0,0x1405C1D50}; + WEAK symbol FindEntityId{0, 0x1405C1C50}; + WEAK symbol GetEntityFieldValue{0, 0x1405C6100}; - WEAK symbol G_GetWeaponForName{ 0x1402C2A90, 0 }; // H1SP(1.4) + WEAK symbol G_GetWeaponForName{0x1402C2A90, 0}; // H1SP(1.4) //WEAK symbol - //G_GivePlayerWeapon{ 0, 0x14051B660 }; + //G_GivePlayerWeapon{0, 0x14051B660}; WEAK symbol - G_GivePlayerWeapon{ 0x1402C2DF0, 0x14051B660 }; // h1sp + G_GivePlayerWeapon{0x1402C2DF0, 0x14051B660}; // h1sp - WEAK symbol G_InitializeAmmo{ 0, 0x1404C4110 }; - WEAK symbol G_SelectWeapon{ 0,0x14051C0D0 }; - WEAK symbol G_TakePlayerWeapon{ 0x1402C3900, 0 }; // H1SP(1.4) + WEAK symbol G_InitializeAmmo{0, 0x1404C4110}; + WEAK symbol G_SelectWeapon{0,0x14051C0D0}; + WEAK symbol G_TakePlayerWeapon{0x1402C3900, 0}; // H1SP(1.4) WEAK symbol Image_Setup{ 0, 0x14074B2A0 }; + uint32_t imageFlags, DXGI_FORMAT imageFormat, int a8, const char* name, const void* initData)> Image_Setup{0, 0x14074B2A0}; - WEAK symbol LUI_OpenMenu{ 0, 0x1404CD210 }; // H1(1.4) + WEAK symbol LUI_OpenMenu{0, 0x1404CD210}; // H1(1.4) - WEAK symbol Menu_IsMenuOpenAndVisible{ 0, 0x1405EE1A0 }; + WEAK symbol Menu_IsMenuOpenAndVisible{0, 0x1405EE1A0}; - WEAK symbol Scr_AllocVector{ 0, 0x1405C3220 }; - WEAK symbol Scr_ClearOutParams{ 0, 0x1405C6E50 }; - WEAK symbol Scr_GetEntityIdRef{ 0, 0x1405C56C0 }; - WEAK symbol Scr_SetObjectField{ 0,0x140512190 }; - WEAK symbol Scr_NotifyId{ 0,0x1405C8240 }; + WEAK symbol Scr_AllocVector{0, 0x1405C3220}; + WEAK symbol Scr_ClearOutParams{0, 0x1405C6E50}; + WEAK symbol Scr_GetEntityIdRef{0, 0x1405C56C0}; + WEAK symbol Scr_SetObjectField{0,0x140512190}; + WEAK symbol Scr_NotifyId{0,0x1405C8240}; - WEAK symbol VM_Execute{ 0, 0x1405C8DB0 }; + WEAK symbol VM_Execute{0, 0x1405C8DB0}; - WEAK symbol R_SyncRenderThread{ 0,0x14076E7D0 }; + WEAK symbol R_SyncRenderThread{0,0x14076E7D0}; WEAK symbol R_AddDObjToScene{ 0, 0x140775C40 }; + float materialTime, __int64 a7, __int64 a8)> R_AddDObjToScene{0, 0x140775C40}; - WEAK symbol SL_ConvertToString{ 0x14036D420, 0x1405BFBB0 }; - WEAK symbol SL_GetString{ 0x14036D9A0, 0x1405C0170 }; + WEAK symbol SL_ConvertToString{0x14036D420, 0x1405BFBB0}; + WEAK symbol SL_GetString{0x14036D9A0, 0x1405C0170}; - WEAK symbol SV_SetConfigstring{ 0, 0x140486720 }; // H1(1.4) + WEAK symbol SV_SetConfigstring{0, 0x140486720}; // H1(1.4) - WEAK symbol SV_Loaded{ 0x140442F60, 0x1404864A0 }; // H1(1.4) + WEAK symbol SV_Loaded{0x140442F60, 0x1404864A0}; // H1(1.4) - WEAK symbol SV_MapExists{ 0, 0x14047ED60 }; // H1(1.4) + WEAK symbol SV_MapExists{0, 0x14047ED60}; // H1(1.4) - WEAK symbol Sys_ShowConsole{ 0x1403E3B90, 0x140514910 }; // H1(1.4) + WEAK symbol Sys_ShowConsole{0x1403E3B90, 0x140514910}; // H1(1.4) - WEAK symbol UI_GetMapDisplayName{ 0, 0x140408CC0 }; // H1(1.4) + WEAK symbol UI_GetMapDisplayName{0, 0x140408CC0}; // H1(1.4) - WEAK symbol UI_GetGameTypeDisplayName{ 0, 0x1404086A0 }; // H1(1.4) + WEAK symbol UI_GetGameTypeDisplayName{0, 0x1404086A0}; // H1(1.4) - WEAK symbol Sys_Error{ 0x1403E0C40, 0x140511520 }; // H1(1.4) + WEAK symbol Sys_Error{0x1403E0C40, 0x140511520}; // H1(1.4) - WEAK symbol UI_SafeTranslateString{ 0x140350430, 0x1405A2930 }; // H1(1.4) + WEAK symbol UI_SafeTranslateString{0x140350430, 0x1405A2930}; // H1(1.4) - WEAK symbol UI_RunMenuScript{ 0, 0x1404CFE60 }; // H1(1.4) + WEAK symbol UI_RunMenuScript{0, 0x1404CFE60}; // H1(1.4) - WEAK symbol longjmp{ 0x140648FD4, 0x14089EED0 }; // H1(1.4) - WEAK symbol _setjmp{ 0x1406BFDD0, 0x1408EC2E0 }; // H1(1.4) + WEAK symbol longjmp{0x140648FD4, 0x14089EED0}; // H1(1.4) + WEAK symbol _setjmp{0x1406BFDD0, 0x1408EC2E0}; // H1(1.4) - WEAK symbol SV_Cmd_ArgvBuffer{ 0x1402EEFD0, 0x1403B05C0 }; + WEAK symbol SV_Cmd_ArgvBuffer{0x1402EEFD0, 0x1403B05C0}; WEAK symbol - Sys_BuildAbsPath{ 0x1403CFF90, 0x140507010 }; // H1(1.4) + Sys_BuildAbsPath{0x1403CFF90, 0x140507010}; // H1(1.4) - WEAK symbol Sys_FileExists{ 0x1403E0CE0, 0x1405115E0 }; // H1(1.4) + WEAK symbol Sys_FileExists{0x1403E0CE0, 0x1405115E0}; // H1(1.4) // Variables - WEAK symbol sv_cmd_args{ 0, 0x14946BA20 }; // H1(1.4) + WEAK symbol sv_cmd_args{0, 0x14946BA20}; // H1(1.4) - WEAK symbol command_whitelist{ 0x141079A60, 0x14120C360 }; // H1(1.4) + WEAK symbol command_whitelist{0x141079A60, 0x14120C360}; // H1(1.4) - WEAK symbol g_assetNames{ 0, 0x140BEF280 }; - WEAK symbol g_poolSize{ 0, 0x140FEADF0 }; // H1(1.4) + WEAK symbol g_assetNames{0, 0x140BEF280}; + WEAK symbol g_poolSize{0, 0x140FEADF0}; // H1(1.4) - WEAK symbol gfxDrawMethod{ 0,0x14EDF9E00 }; + WEAK symbol gfxDrawMethod{0, 0x14EDF9E00}; - WEAK symbol dvarCount{ 0, 0x14D064CF4 }; //h1mp - WEAK symbol sortedDvars{ 0,0x14D064D00 }; //h1mp + WEAK symbol dvarCount{0, 0x14D064CF4}; //h1mp + WEAK symbol sortedDvars{0, 0x14D064D00}; //h1mp - WEAK symbol levelEntityId{ 0,0x14B5E0B30 }; - WEAK symbol g_script_error_level{ 0,0x14BA9CC24 }; - WEAK symbol g_script_error{ 0,0x14BA9CD40 }; - WEAK symbol g_classMap{ 0, 0x140BF95C0 }; + WEAK symbol levelEntityId{0, 0x14B5E0B30}; + WEAK symbol g_script_error_level{0, 0x14BA9CC24}; + WEAK symbol g_script_error{0, 0x14BA9CD40}; + WEAK symbol g_classMap{0, 0x140BF95C0}; - WEAK symbol scr_VarGlob{ 0, 0x14B617C00 }; - WEAK symbol scr_VmPub{ 0,0x14BA9EE40 }; - WEAK symbol scr_function_stack{ 0,0x14BAA93C0 }; - WEAK symbol DB_XAssetPool{ 0x140DE8C80, 0x140FEB5D0 }; // H1(1.4) + WEAK symbol scr_VarGlob{0, 0x14B617C00}; + WEAK symbol scr_VmPub{0, 0x14BA9EE40}; + WEAK symbol scr_function_stack{0, 0x14BAA93C0}; + WEAK symbol DB_XAssetPool{0x140DE8C80, 0x140FEB5D0}; // H1(1.4) - WEAK symbol threadIds{0x14B19B880, 0x149810E00 }; // H1(1.4) + WEAK symbol threadIds{0x14B19B880, 0x149810E00}; // H1(1.4) namespace mp { - WEAK symbol g_entities{ 0, 0x14621E530 }; // H1(1.4) - WEAK symbol svs_clients{ 0, 0x14B204A10 }; // H1(1.4) - WEAK symbol gameTime{ 0, 0x14621BDBC }; // H1(1.4) + WEAK symbol g_entities{0, 0x14621E530}; // H1(1.4) + WEAK symbol svs_clients{0, 0x14B204A10}; // H1(1.4) + WEAK symbol gameTime{0, 0x14621BDBC}; // H1(1.4) } namespace sp { - WEAK symbol g_entities{ 0x14550DD90 , 0 }; // H1(1.4) + WEAK symbol g_entities{0x14550DD90, 0}; // H1(1.4) } } diff --git a/src/client/main.cpp b/src/client/main.cpp index 9be28653..963e354a 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -14,7 +14,6 @@ DECLSPEC_NORETURN void WINAPI exit_hook(const int code) exit(code); } - BOOL WINAPI system_parameters_info_a(const UINT uiAction, const UINT uiParam, const PVOID pvParam, const UINT fWinIni) { component_loader::post_unpack();