fixed #1237 - crash in UpdateCurrentMap
This commit is contained in:
@@ -153,12 +153,16 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
|
|
||||||
void UpdateCurrentMap()
|
void UpdateCurrentMap()
|
||||||
{
|
{
|
||||||
if (MapUid == orderManager.LobbyInfo.GlobalSettings.Map) return;
|
var newMap = orderManager.LobbyInfo.GlobalSettings.Map;
|
||||||
MapUid = orderManager.LobbyInfo.GlobalSettings.Map;
|
if (MapUid == newMap) return;
|
||||||
|
|
||||||
|
MapUid = newMap;
|
||||||
Map = new Map(Game.modData.AvailableMaps[MapUid].Path);
|
Map = new Map(Game.modData.AvailableMaps[MapUid].Path);
|
||||||
|
|
||||||
var title = Widget.RootWidget.GetWidget<LabelWidget>("LOBBY_TITLE");
|
var title = Widget.RootWidget.GetWidget<LabelWidget>("LOBBY_TITLE");
|
||||||
title.Text = "OpenRA Multiplayer Lobby - " + orderManager.LobbyInfo.GlobalSettings.ServerName + " - " + Map.Title;
|
if (title != null)
|
||||||
|
title.Text = "OpenRA Multiplayer Lobby - {0} - {1}".F(
|
||||||
|
orderManager.LobbyInfo.GlobalSettings.ServerName, Map.Title);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdatePlayerList()
|
void UpdatePlayerList()
|
||||||
|
|||||||
Reference in New Issue
Block a user