fix crash wrt chat in lobby

This commit is contained in:
Bob
2010-10-12 20:32:33 +13:00
parent 7ca9fcdac9
commit 6b6c9639f9
2 changed files with 5 additions and 9 deletions

View File

@@ -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":