Remove some unnecessary fields from chrome
This commit is contained in:
@@ -33,14 +33,13 @@ namespace OpenRA.Network
|
||||
case "Chat":
|
||||
{
|
||||
var client = Game.LobbyInfo.Clients.FirstOrDefault(c => c.Index == clientId);
|
||||
if (client != null && Chrome.chatWidget != null)
|
||||
Chrome.chatWidget.AddLine(Game.world.PlayerColors()[client.PaletteIndex].Color, client.Name, order.TargetString);
|
||||
Game.AddChatLine(Game.world.PlayerColors()[client.PaletteIndex].Color, client.Name, order.TargetString);
|
||||
break;
|
||||
}
|
||||
case "TeamChat":
|
||||
{
|
||||
var client = Game.LobbyInfo.Clients.FirstOrDefault(c => c.Index == clientId);
|
||||
if (client != null && Chrome.chatWidget != null)
|
||||
if (client != null)
|
||||
{
|
||||
var player = Game.world.players.Values.FirstOrDefault(p => p.Index == client.Index);
|
||||
var isAlly = (world.GameHasStarted) ?
|
||||
@@ -48,15 +47,13 @@ namespace OpenRA.Network
|
||||
client == Game.LocalClient || (client.Team == Game.LocalClient.Team && client.Team != 0);
|
||||
|
||||
if (isAlly)
|
||||
Chrome.chatWidget.AddLine(Game.world.PlayerColors()[client.PaletteIndex].Color, client.Name + " (Team)", order.TargetString);
|
||||
Game.AddChatLine(Game.world.PlayerColors()[client.PaletteIndex].Color, client.Name + " (Team)", order.TargetString);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "StartGame":
|
||||
{
|
||||
if (Chrome.chatWidget != null)
|
||||
Chrome.chatWidget.AddLine(Color.White, "Server", "The game has started.");
|
||||
|
||||
Game.AddChatLine(Color.White, "Server", "The game has started.");
|
||||
Game.StartGame();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user