fixed crash on joining a server
This commit is contained in:
@@ -58,13 +58,9 @@ namespace OpenRA
|
|||||||
|
|
||||||
public void SetLocalPlayer(int index)
|
public void SetLocalPlayer(int index)
|
||||||
{
|
{
|
||||||
if (index != localPlayerIndex)
|
localPlayerIndex = index;
|
||||||
{
|
if (!string.IsNullOrEmpty(Game.Settings.PlayerName)
|
||||||
localPlayerIndex = index;
|
&& Game.LobbyInfo.Clients[index].Name != Game.Settings.PlayerName)
|
||||||
Game.viewport.GoToStartLocation(LocalPlayer);
|
|
||||||
//Game.chat.AddLine(LocalPlayer, "is now YOU");
|
|
||||||
}
|
|
||||||
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