diff --git a/OpenRA.Game/Network/Session.cs b/OpenRA.Game/Network/Session.cs index 9072c6537e..cf70100ea0 100644 --- a/OpenRA.Game/Network/Session.cs +++ b/OpenRA.Game/Network/Session.cs @@ -23,7 +23,7 @@ namespace OpenRA.Network public Client ClientWithIndex( int clientID ) { - return Clients.Single( c => c.Index == clientID ); + return Clients.SingleOrDefault( c => c.Index == clientID ); } public Client ClientInSlot( Slot slot ) diff --git a/OpenRA.Game/Network/UnitOrders.cs b/OpenRA.Game/Network/UnitOrders.cs index d106b5b3da..05f85a51bb 100755 --- a/OpenRA.Game/Network/UnitOrders.cs +++ b/OpenRA.Game/Network/UnitOrders.cs @@ -36,14 +36,10 @@ namespace OpenRA.Network case "Chat": { var client = orderManager.LobbyInfo.ClientWithIndex( clientId ); - if (client != null) - { - var player = world.FindPlayerByClientId(clientId); - if (player != null && player.WinState == WinState.Lost) - Game.AddChatLine(client.Color1, client.Name + " (Dead)", order.TargetString); - else - Game.AddChatLine(client.Color1, client.Name, order.TargetString); - } + if( client != null ) + Game.AddChatLine( client.Color1, client.Name, order.TargetString ); + else + Game.AddChatLine( Color.White, "(player {0})".F( clientId ), order.TargetString ); break; } case "TeamChat":