#289 lobby title should show servername -- fixed

This commit is contained in:
Chris Forbes
2010-10-13 20:45:03 +13:00
parent dca77956cb
commit 4afd8ad783
5 changed files with 9 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ namespace OpenRA.Network
public class Global
{
public string ServerName;
public string Map;
public string[] Mods = { "ra" }; // mod names
public int OrderLatency = 3;

View File

@@ -64,6 +64,7 @@ namespace OpenRA.Server
lobbyInfo.GlobalSettings.RandomSeed = randomSeed;
lobbyInfo.GlobalSettings.Map = map;
lobbyInfo.GlobalSettings.AllowCheats = settings.Server.AllowCheats;
lobbyInfo.GlobalSettings.ServerName = settings.Server.Name;
LoadMap(); // populates the Session's slots, too.

View File

@@ -180,6 +180,9 @@ namespace OpenRA.Widgets.Delegates
if (MapUid == orderManager.LobbyInfo.GlobalSettings.Map) return;
MapUid = orderManager.LobbyInfo.GlobalSettings.Map;
Map = Game.modData.AvailableMaps[MapUid];
var title = Widget.RootWidget.GetWidget<LabelWidget>("LOBBY_TITLE");
title.Text = "OpenRA Multiplayer Lobby - " + orderManager.LobbyInfo.GlobalSettings.ServerName;
}
bool hasJoined = false;