From db37b14392c4f3efdeae54ca8ceef4354adf1c95 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Thu, 15 Oct 2015 15:05:17 +0200 Subject: [PATCH] Minor code (style) cleanup --- OpenRA.Game/Network/UnitOrders.cs | 3 +-- .../Widgets/Logic/Ingame/IngameChatLogic.cs | 15 ++++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/OpenRA.Game/Network/UnitOrders.cs b/OpenRA.Game/Network/UnitOrders.cs index 0264d37978..7e1ef0a17f 100644 --- a/OpenRA.Game/Network/UnitOrders.cs +++ b/OpenRA.Game/Network/UnitOrders.cs @@ -76,8 +76,7 @@ namespace OpenRA.Network if (world == null) { if (orderManager.LocalClient != null && client.Team == orderManager.LocalClient.Team) - Game.AddChatLine(client.Color.RGB, client.Name + " (Team)", - order.TargetString); + Game.AddChatLine(client.Color.RGB, client.Name + " (Team)", order.TargetString); } else { diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs index ad6b1da00f..f5658c525c 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs @@ -71,15 +71,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic { var team = teamChat && !disableTeamChat; if (chatText.Text != "") + { if (!chatText.Text.StartsWith("/")) orderManager.IssueOrder(Order.Chat(team, chatText.Text.Trim())); - else - if (chatTraits != null) - { - var text = chatText.Text.Trim(); - foreach (var trait in chatTraits) - trait.OnChat(orderManager.LocalClient.Name, text); - } + else if (chatTraits != null) + { + var text = chatText.Text.Trim(); + foreach (var trait in chatTraits) + trait.OnChat(orderManager.LocalClient.Name, text); + } + } chatText.Text = ""; CloseChat();