fixed crash on joining a server
This commit is contained in:
@@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user