Menu-FN: List ping for ICE servers correctly, View Game Info will now return to the appropriate menu
This commit is contained in:
parent
602fa9fd93
commit
1ccb640ce6
4 changed files with 36 additions and 11 deletions
|
@ -1681,4 +1681,13 @@ msgid "UPDATE_PENDING_DISABLE"
|
||||||
msgstr "Disable (pending)"
|
msgstr "Disable (pending)"
|
||||||
|
|
||||||
msgid "UPDATE_PENDING_RETAIN"
|
msgid "UPDATE_PENDING_RETAIN"
|
||||||
msgstr "Retain (pending)"
|
msgstr "Retain (pending)"
|
||||||
|
|
||||||
|
msgid "PING_ICE"
|
||||||
|
msgstr "Unavailable (ICE)"
|
||||||
|
|
||||||
|
msgid "PING_ICE_S"
|
||||||
|
msgstr "ICE"
|
||||||
|
|
||||||
|
msgid "PING_IN_MS"
|
||||||
|
msgstr "%d ms."
|
|
@ -138,6 +138,7 @@ inet_refreshframe(void)
|
||||||
string address;
|
string address;
|
||||||
string players;
|
string players;
|
||||||
string ping;
|
string ping;
|
||||||
|
float serverPing;
|
||||||
|
|
||||||
address = gethostcachestring(srv_fldAdress, i);
|
address = gethostcachestring(srv_fldAdress, i);
|
||||||
|
|
||||||
|
@ -150,7 +151,14 @@ inet_refreshframe(void)
|
||||||
stof(gethostcachestring(srv_fldPlayers, i)),
|
stof(gethostcachestring(srv_fldPlayers, i)),
|
||||||
stof(gethostcachestring(srv_fldMaxplayers, i))
|
stof(gethostcachestring(srv_fldMaxplayers, i))
|
||||||
);
|
);
|
||||||
ping = sprintf("%d", stof(gethostcachestring(srv_fldPing, i)));
|
|
||||||
|
serverPing = stof(gethostcachestring(srv_fldPing, i));
|
||||||
|
|
||||||
|
if (serverPing == 65534)
|
||||||
|
ping = _("PING_ICE_S");
|
||||||
|
else
|
||||||
|
ping = sprintf(_("PING_IN_MS"), serverPing);
|
||||||
|
|
||||||
inet_lbServers_Name.AddEntry(gethostcachestring(srv_fldName, i));
|
inet_lbServers_Name.AddEntry(gethostcachestring(srv_fldName, i));
|
||||||
inet_lbServers_Ping.AddEntry(ping);
|
inet_lbServers_Ping.AddEntry(ping);
|
||||||
inet_lbServers_Map.AddEntry(gethostcachestring(srv_fldMap, i));
|
inet_lbServers_Map.AddEntry(gethostcachestring(srv_fldMap, i));
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
var bool g_menuLAN = false;
|
||||||
|
|
||||||
CWidget fn_multiplayer;
|
CWidget fn_multiplayer;
|
||||||
|
|
||||||
CMainButton mp_btnQuickstart;
|
CMainButton mp_btnQuickstart;
|
||||||
|
@ -71,6 +73,7 @@ mp_btninet_start(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
localsound("../media/launch_upmenu1.wav");
|
localsound("../media/launch_upmenu1.wav");
|
||||||
|
g_menuLAN = false;
|
||||||
|
|
||||||
if (g_connected == TRUE) {
|
if (g_connected == TRUE) {
|
||||||
header.SetStartEndPos(50,172,45,45);
|
header.SetStartEndPos(50,172,45,45);
|
||||||
|
@ -118,6 +121,8 @@ mp_btnlan_start(void)
|
||||||
static void mp_btnlan_end(void) {
|
static void mp_btnlan_end(void) {
|
||||||
g_menupage = PAGE_LANGAMES;
|
g_menupage = PAGE_LANGAMES;
|
||||||
}
|
}
|
||||||
|
g_menuLAN = true;
|
||||||
|
|
||||||
Master_GetLANList();
|
Master_GetLANList();
|
||||||
localsound("../media/launch_upmenu1.wav");
|
localsound("../media/launch_upmenu1.wav");
|
||||||
header.SetStartEndPos(50,268,45,45);
|
header.SetStartEndPos(50,268,45,45);
|
||||||
|
|
|
@ -36,7 +36,10 @@ static void
|
||||||
vgi_btndone_start(void)
|
vgi_btndone_start(void)
|
||||||
{
|
{
|
||||||
static void vgi_btndone_end(void) {
|
static void vgi_btndone_end(void) {
|
||||||
g_menupage = PAGE_MULTIPLAYER;
|
if (g_menuLAN == true)
|
||||||
|
g_menupage = PAGE_LANGAMES;
|
||||||
|
else
|
||||||
|
g_menupage = PAGE_INTERNETGAMES;
|
||||||
}
|
}
|
||||||
localsound("../media/launch_dnmenu1.wav");
|
localsound("../media/launch_dnmenu1.wav");
|
||||||
header.SetStartEndPos(45, 45, 50, 172);
|
header.SetStartEndPos(45, 45, 50, 172);
|
||||||
|
@ -88,12 +91,12 @@ menu_viewgameinfo_setserver(float serverNum)
|
||||||
|
|
||||||
vgi_sbPlayers.SetMax(playerCount+1);
|
vgi_sbPlayers.SetMax(playerCount+1);
|
||||||
|
|
||||||
print(sprintf("Server Num? %d\n", serverNum));
|
//print(sprintf("Server Num? %d\n", serverNum));
|
||||||
print(sprintf("PlayerCount? %d\n", playerCount));
|
//print(sprintf("PlayerCount? %d\n", playerCount));
|
||||||
print(sprintf("ServerInfo? %S\n", serverInfo));
|
//print(sprintf("ServerInfo? %S\n", serverInfo));
|
||||||
print(sprintf("Player? %S\n", gethostcachestring( srv_fldPlayer0, serverNum )));
|
//print(sprintf("Player? %S\n", gethostcachestring( srv_fldPlayer0, serverNum )));
|
||||||
print(sprintf("Player1? %S\n", gethostcachestring( gethostcacheindexforkey("player1"), serverNum )));
|
//print(sprintf("Player1? %S\n", gethostcachestring( gethostcacheindexforkey("player1"), serverNum )));
|
||||||
print(sprintf("Player2? %S\n", gethostcachestring( gethostcacheindexforkey("player0"), serverNum )));
|
//print(sprintf("Player2? %S\n", gethostcachestring( gethostcacheindexforkey("player0"), serverNum )));
|
||||||
|
|
||||||
vgi_lbPlayerNum.Clear();
|
vgi_lbPlayerNum.Clear();
|
||||||
vgi_lbPlayerName.Clear();
|
vgi_lbPlayerName.Clear();
|
||||||
|
@ -108,9 +111,9 @@ menu_viewgameinfo_setserver(float serverNum)
|
||||||
float serverPing = stof(gethostcachestring(srv_fldPing, serverNum));
|
float serverPing = stof(gethostcachestring(srv_fldPing, serverNum));
|
||||||
|
|
||||||
if (serverPing == 65534)
|
if (serverPing == 65534)
|
||||||
g_vgiLabelPing = "Unavailable (ICE)";
|
g_vgiLabelPing = _("PING_ICE");
|
||||||
else
|
else
|
||||||
g_vgiLabelPing = sprintf("%d ms.", serverPing);
|
g_vgiLabelPing = sprintf(_("PING_IN_MS"), serverPing);
|
||||||
|
|
||||||
/* add the player info entries */
|
/* add the player info entries */
|
||||||
for (int i = 0; i < playerCount; i++) {
|
for (int i = 0; i < playerCount; i++) {
|
||||||
|
|
Loading…
Reference in a new issue