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

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