diff --git a/src/client/component/getinfo.cpp b/src/client/component/getinfo.cpp index ee848f15..67c8f3b6 100644 --- a/src/client/component/getinfo.cpp +++ b/src/client/component/getinfo.cpp @@ -103,7 +103,7 @@ namespace getinfo info.set("description", game::is_server() ? game::get_dvar_string("live_steam_server_description") : ""); info.set("xuid", utils::string::va("%llX", steam::SteamUser()->GetSteamID().bits)); - info.set("mapname", game::get_dvar_string("mapname")); + info.set("mapname", game::get_dvar_string("mapname")); info.set("isPrivate", game::get_dvar_string("g_password").empty() ? "0" : "1"); info.set("clients", utils::string::va("%zu", get_client_count())); info.set("bots", utils::string::va("%zu", get_bot_count())); @@ -112,7 +112,8 @@ namespace getinfo info.set("playmode", utils::string::va("%i", game::Com_SessionMode_GetMode())); info.set("gamemode", utils::string::va("%i", Com_SessionMode_GetGameMode())); info.set("sv_running", utils::string::va("%i", game::is_server_running())); - info.set("dedicated", utils::string::va("%i", game::is_server() ? 1 : 0)); + info.set("dedicated", utils::string::va("%i", game::is_server() ? 1 : 0)); + info.set("hc", utils::string::va("%u", game::Com_GametypeSettings_GetUInt("hardcoremode", false))); info.set("shortversion", SHORTVERSION); network::send(target, "infoResponse", info.build(), '\n'); diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 205c0348..38090235 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -31,6 +31,7 @@ namespace game WEAK symbol Com_GametypeSettings_SetGametype{ 0x1420F5980 }; + WEAK symbol Com_GametypeSettings_GetUInt{0x1420F4E00, 0x1404FE5C0}; WEAK symbol Com_IsRunningUILevel{0x142148350}; WEAK symbol Com_SwitchMode{ 0x14214A4D0 diff --git a/src/client/steam/interfaces/matchmaking_servers.cpp b/src/client/steam/interfaces/matchmaking_servers.cpp index 13d25e84..79f0f784 100644 --- a/src/client/steam/interfaces/matchmaking_servers.cpp +++ b/src/client/steam/interfaces/matchmaking_servers.cpp @@ -55,9 +55,10 @@ namespace steam const auto mode = game::eModes(std::atoi(playmode.data())); const auto* tags = ::utils::string::va( - R"(\gametype\%s\dedicated\%s\ranked\false\hardcore\false\zombies\%s\modName\\playerCount\%d\bots\%d\)", + R"(\gametype\%s\dedicated\%s\ranked\false\hardcore\%s\zombies\%s\modName\\playerCount\%d\bots\%d\)", info.get("gametype").data(), - info.get("dedicated") == "1" ? "true" : "false", + info.get("dedicated") == "1" ? "true" : "false", + info.get("hc") == "1" ? "true" : "false", mode == game::MODE_ZOMBIES ? "true" : "false", server.m_nPlayers, atoi(info.get("bots").data()));