fix crash wrt chat in lobby
This commit is contained in:
@@ -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 )
|
||||
|
||||
@@ -37,13 +37,9 @@ namespace OpenRA.Network
|
||||
{
|
||||
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 );
|
||||
}
|
||||
else
|
||||
Game.AddChatLine( Color.White, "(player {0})".F( clientId ), order.TargetString );
|
||||
break;
|
||||
}
|
||||
case "TeamChat":
|
||||
|
||||
Reference in New Issue
Block a user