Merge remote-tracking branch 'upstream/main' into connect
This commit is contained in:
commit
f99c9d740e
@ -25,6 +25,11 @@ namespace getinfo
|
|||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
const auto client_states = *reinterpret_cast<uint64_t*>(game::select(0x1576FB318, 0x14A178E98));
|
const auto client_states = *reinterpret_cast<uint64_t*>(game::select(0x1576FB318, 0x14A178E98));
|
||||||
|
if (!client_states)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
const auto object_length = game::is_server() ? 0xE5110 : 0xE5170;
|
const auto object_length = game::is_server() ? 0xE5110 : 0xE5170;
|
||||||
|
|
||||||
for (int i = 0; i < get_max_client_count(); ++i)
|
for (int i = 0; i < get_max_client_count(); ++i)
|
||||||
@ -41,6 +46,12 @@ namespace getinfo
|
|||||||
|
|
||||||
int get_bot_count()
|
int get_bot_count()
|
||||||
{
|
{
|
||||||
|
const auto client_states = *reinterpret_cast<uint64_t*>(game::select(0x1576FB318, 0x14A178E98));
|
||||||
|
if (!client_states)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
for (int i = 0; i < get_max_client_count(); ++i)
|
for (int i = 0; i < get_max_client_count(); ++i)
|
||||||
@ -78,10 +89,12 @@ namespace getinfo
|
|||||||
utils::info_string info{};
|
utils::info_string info{};
|
||||||
info.set("challenge", std::string(data.begin(), data.end()));
|
info.set("challenge", std::string(data.begin(), data.end()));
|
||||||
info.set("gamename", "T7");
|
info.set("gamename", "T7");
|
||||||
info.set("hostname", game::get_dvar_string(game::is_server() ? "live_steam_server_name" : "sv_hostname"));
|
info.set("hostname",
|
||||||
|
game::get_dvar_string(game::is_server() ? "live_steam_server_name" : "sv_hostname"));
|
||||||
info.set("gametype", game::get_dvar_string("g_gametype"));
|
info.set("gametype", game::get_dvar_string("g_gametype"));
|
||||||
//info.set("sv_motd", get_dvar_string("sv_motd"));
|
//info.set("sv_motd", get_dvar_string("sv_motd"));
|
||||||
info.set("description", game::is_server() ? game::get_dvar_string("live_steam_server_description") : "");
|
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("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("isPrivate", game::get_dvar_string("g_password").empty() ? "0" : "1");
|
||||||
|
@ -292,7 +292,7 @@ namespace
|
|||||||
updater::update();
|
updater::update();
|
||||||
|
|
||||||
const auto launch = utils::flags::has_flag("launch");
|
const auto launch = utils::flags::has_flag("launch");
|
||||||
if (!launch && !launcher::run())
|
if (!launch && !utils::nt::is_wine() && !launcher::run())
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user