1 net tick is 120 ms and good order latency should be 2-3

color code names in lobby accordingly
This commit is contained in:
Matthias Mailänder
2013-04-18 23:42:32 +02:00
parent d2a6781e7e
commit ef20009310
4 changed files with 19 additions and 2 deletions

View File

@@ -26,6 +26,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
if (c.IsAdmin)
name.Font = "Bold";
name.Text = c.Name;
if (c.Ping > -1)
name.TextColor = GetPingColor(c.Ping);
name.OnEnterKey = () =>
{
name.Text = name.Text.Trim();
@@ -189,5 +191,14 @@ namespace OpenRA.Mods.RA.Widgets.Logic
Game.Renderer.Fonts["Bold"].DrawTextWithContrast(client.Name, position + new int2(5, 5), Color.White, Color.Black, 1);
}
}
public static Color GetPingColor(int ping)
{
if (ping > 720) // OrderLag > 6
return Color.Red;
if (ping > 360) // OrderLag > 3
return Color.Orange;
return Color.LimeGreen;
}
}
}