fixed crash on joining a server

This commit is contained in:
Chris Forbes
2010-03-19 19:10:26 +13:00
parent 1b802aad79
commit 1de616728f

View File

@@ -57,14 +57,10 @@ namespace OpenRA
} }
public void SetLocalPlayer(int index) public void SetLocalPlayer(int index)
{
if (index != localPlayerIndex)
{ {
localPlayerIndex = index; localPlayerIndex = index;
Game.viewport.GoToStartLocation(LocalPlayer); if (!string.IsNullOrEmpty(Game.Settings.PlayerName)
//Game.chat.AddLine(LocalPlayer, "is now YOU"); && Game.LobbyInfo.Clients[index].Name != Game.Settings.PlayerName)
}
if (!string.IsNullOrEmpty(Game.Settings.PlayerName) && LocalPlayer.PlayerName != Game.Settings.PlayerName)
Game.IssueOrder(Order.Chat("/name " + Game.Settings.PlayerName)); Game.IssueOrder(Order.Chat("/name " + Game.Settings.PlayerName));
} }