send info about aim assist and voice chat (#430)
This commit is contained in:
parent
f195b70472
commit
ca7b8f797d
@ -43,6 +43,8 @@ namespace Components
|
|||||||
|
|
||||||
static void OnMouseMove(int x, int y, int dx, int dy);
|
static void OnMouseMove(int x, int y, int dx, int dy);
|
||||||
|
|
||||||
|
static Dvar::Var sv_allowAimAssist;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Game::ButtonToCodeMap_t buttonList[];
|
static Game::ButtonToCodeMap_t buttonList[];
|
||||||
static Game::StickToCodeMap_t analogStickList[4];
|
static Game::StickToCodeMap_t analogStickList[4];
|
||||||
@ -87,7 +89,6 @@ namespace Components
|
|||||||
static Dvar::Var gpad_slowdown_enabled;
|
static Dvar::Var gpad_slowdown_enabled;
|
||||||
static Dvar::Var input_viewSensitivity;
|
static Dvar::Var input_viewSensitivity;
|
||||||
static Dvar::Var input_invertPitch;
|
static Dvar::Var input_invertPitch;
|
||||||
static Dvar::Var sv_allowAimAssist;
|
|
||||||
static Dvar::Var aim_turnrate_pitch;
|
static Dvar::Var aim_turnrate_pitch;
|
||||||
static Dvar::Var aim_turnrate_pitch_ads;
|
static Dvar::Var aim_turnrate_pitch_ads;
|
||||||
static Dvar::Var aim_turnrate_yaw;
|
static Dvar::Var aim_turnrate_yaw;
|
||||||
|
@ -352,7 +352,9 @@ namespace Components
|
|||||||
info.set("isPrivate", (Dvar::Var("g_password").get<std::string>().size() ? "1" : "0"));
|
info.set("isPrivate", (Dvar::Var("g_password").get<std::string>().size() ? "1" : "0"));
|
||||||
info.set("hc", (Dvar::Var("g_hardcore").get<bool>() ? "1" : "0"));
|
info.set("hc", (Dvar::Var("g_hardcore").get<bool>() ? "1" : "0"));
|
||||||
info.set("securityLevel", Utils::String::VA("%i", Dvar::Var("sv_securityLevel").get<int>()));
|
info.set("securityLevel", Utils::String::VA("%i", Dvar::Var("sv_securityLevel").get<int>()));
|
||||||
info.set("sv_running", (Dvar::Var("sv_running").get<bool>() ? "1" : "0"));
|
info.set("sv_running", ((*Game::com_sv_running)->current.enabled ? "1" : "0"));
|
||||||
|
info.set("aimAssist", (Gamepad::sv_allowAimAssist.get<bool>() ? "1" : "0"));
|
||||||
|
info.set("voiceChat", (Voice::SV_VoiceEnabled() ? "1" : "0"));
|
||||||
|
|
||||||
// Ensure mapname is set
|
// Ensure mapname is set
|
||||||
if (info.get("mapname").empty() || Party::IsInLobby())
|
if (info.get("mapname").empty() || Party::IsInLobby())
|
||||||
|
@ -60,6 +60,8 @@ namespace Components
|
|||||||
Dvar::Var("uiSi_MapNameLoc").set(Game::UI_LocalizeMapName(info->mapname.data()));
|
Dvar::Var("uiSi_MapNameLoc").set(Game::UI_LocalizeMapName(info->mapname.data()));
|
||||||
Dvar::Var("uiSi_GameType").set(Game::UI_LocalizeGameType(info->gametype.data()));
|
Dvar::Var("uiSi_GameType").set(Game::UI_LocalizeGameType(info->gametype.data()));
|
||||||
Dvar::Var("uiSi_ModName").set("");
|
Dvar::Var("uiSi_ModName").set("");
|
||||||
|
Dvar::Var("uiSi_aimAssist").set(info->aimassist ? "@MENU_YES" : "@MENU_NO");
|
||||||
|
Dvar::Var("uiSi_voiceChat").set(info->voice ? "@MENU_YES" : "@MENU_NO");
|
||||||
|
|
||||||
if (info->mod.size() > 5)
|
if (info->mod.size() > 5)
|
||||||
{
|
{
|
||||||
@ -142,6 +144,8 @@ namespace Components
|
|||||||
info.set("mapname", (*Game::sv_mapname)->current.string);
|
info.set("mapname", (*Game::sv_mapname)->current.string);
|
||||||
info.set("isPrivate", (Dvar::Var("g_password").get<std::string>().empty() ? "0" : "1"));
|
info.set("isPrivate", (Dvar::Var("g_password").get<std::string>().empty() ? "0" : "1"));
|
||||||
info.set("checksum", Utils::String::VA("%X", Utils::Cryptography::JenkinsOneAtATime::Compute(Utils::String::VA("%u", Game::Sys_Milliseconds()))));
|
info.set("checksum", Utils::String::VA("%X", Utils::Cryptography::JenkinsOneAtATime::Compute(Utils::String::VA("%u", Game::Sys_Milliseconds()))));
|
||||||
|
info.set("aimAssist", (Gamepad::sv_allowAimAssist.get<bool>() ? "1" : "0"));
|
||||||
|
info.set("voiceChat", (Voice::SV_VoiceEnabled() ? "1" : "0"));
|
||||||
|
|
||||||
// Ensure mapname is set
|
// Ensure mapname is set
|
||||||
if (info.get("mapname").empty())
|
if (info.get("mapname").empty())
|
||||||
@ -245,6 +249,8 @@ namespace Components
|
|||||||
Dvar::Var("uiSi_MapNameLoc").set(Game::UI_LocalizeMapName(info.get("mapname").data()));
|
Dvar::Var("uiSi_MapNameLoc").set(Game::UI_LocalizeMapName(info.get("mapname").data()));
|
||||||
Dvar::Var("uiSi_GameType").set(Game::UI_LocalizeGameType(info.get("g_gametype").data()));
|
Dvar::Var("uiSi_GameType").set(Game::UI_LocalizeGameType(info.get("g_gametype").data()));
|
||||||
Dvar::Var("uiSi_ModName").set("");
|
Dvar::Var("uiSi_ModName").set("");
|
||||||
|
Dvar::Var("uiSi_aimAssist").set(info.get("aimAssist") == "0" ? "@MENU_DISABLED" : "@MENU_ENABLED");
|
||||||
|
Dvar::Var("uiSi_voiceChat").set(info.get("voiceChat") == "0" ? "@MENU_DISABLED" : "@MENU_ENABLED");
|
||||||
|
|
||||||
switch (atoi(info.get("scr_team_fftype").data()))
|
switch (atoi(info.get("scr_team_fftype").data()))
|
||||||
{
|
{
|
||||||
|
@ -87,6 +87,16 @@ namespace Components
|
|||||||
return ((server->matchType == 1) ? "P" : "M");
|
return ((server->matchType == 1) ? "P" : "M");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case Column::AimAssist:
|
||||||
|
{
|
||||||
|
return ((server->aimassist == 1) ? "X" : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
case Column::VoiceChat:
|
||||||
|
{
|
||||||
|
return ((server->voice == 1) ? "X" : "");
|
||||||
|
}
|
||||||
|
|
||||||
case Column::Hostname:
|
case Column::Hostname:
|
||||||
{
|
{
|
||||||
return server->hostname.data();
|
return server->hostname.data();
|
||||||
@ -483,6 +493,8 @@ namespace Components
|
|||||||
server.securityLevel = atoi(info.get("securityLevel").data());
|
server.securityLevel = atoi(info.get("securityLevel").data());
|
||||||
server.maxClients = atoi(info.get("sv_maxclients").data());
|
server.maxClients = atoi(info.get("sv_maxclients").data());
|
||||||
server.password = (atoi(info.get("isPrivate").data()) != 0);
|
server.password = (atoi(info.get("isPrivate").data()) != 0);
|
||||||
|
server.aimassist = (atoi(info.get("aimAssist").data()) != 0);
|
||||||
|
server.voice = (atoi(info.get("voiceChat").data()) != 0);
|
||||||
server.hardcore = (atoi(info.get("hc").data()) != 0);
|
server.hardcore = (atoi(info.get("hc").data()) != 0);
|
||||||
server.svRunning = (atoi(info.get("sv_running").data()) != 0);
|
server.svRunning = (atoi(info.get("sv_running").data()) != 0);
|
||||||
server.ping = (Game::Sys_Milliseconds() - i->sendTime);
|
server.ping = (Game::Sys_Milliseconds() - i->sendTime);
|
||||||
|
@ -28,6 +28,8 @@ namespace Components
|
|||||||
int securityLevel;
|
int securityLevel;
|
||||||
bool hardcore;
|
bool hardcore;
|
||||||
bool svRunning;
|
bool svRunning;
|
||||||
|
bool aimassist;
|
||||||
|
bool voice;
|
||||||
};
|
};
|
||||||
|
|
||||||
ServerList();
|
ServerList();
|
||||||
@ -59,6 +61,8 @@ namespace Components
|
|||||||
{
|
{
|
||||||
Password,
|
Password,
|
||||||
Matchtype,
|
Matchtype,
|
||||||
|
AimAssist,
|
||||||
|
VoiceChat,
|
||||||
Hostname,
|
Hostname,
|
||||||
Mapname,
|
Mapname,
|
||||||
Players,
|
Players,
|
||||||
|
Loading…
Reference in New Issue
Block a user