Replaced ForEach with loop, moved Trim outside.
This commit is contained in:
@@ -78,7 +78,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
orderManager.IssueOrder(Order.Chat(team, chatText.Text.Trim()));
|
orderManager.IssueOrder(Order.Chat(team, chatText.Text.Trim()));
|
||||||
else
|
else
|
||||||
if (chatTraits != null)
|
if (chatTraits != null)
|
||||||
chatTraits.ForEach(x => x.OnChat(orderManager.LocalClient.Name, chatText.Text.Trim()));
|
{
|
||||||
|
var text = chatText.Text.Trim();
|
||||||
|
foreach (var trait in chatTraits)
|
||||||
|
trait.OnChat(orderManager.LocalClient.Name, text);
|
||||||
|
}
|
||||||
|
|
||||||
CloseChat();
|
CloseChat();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user