This commit is contained in:
Chris Forbes
2009-12-04 22:41:18 +13:00
parent c3d5927d23
commit 165037f833
2 changed files with 6 additions and 0 deletions

View File

@@ -17,7 +17,10 @@ namespace OpenRa.Game
public void Toggle()
{
if (isChatting && typing.Length > 0)
{
Game.controller.AddOrder(Order.Chat(Game.LocalPlayer, typing));
AddLine(Game.LocalPlayer.PlayerName, typing);
}
typing = "";
isChatting ^= true;
@@ -37,6 +40,7 @@ namespace OpenRa.Game
public void AddLine(string from, string text)
{
recentLines.Add(Pair.New(from, text));
Game.PlaySound("rabeep1.aud", false);
while (recentLines.Count > logLength) recentLines.RemoveAt(0);
}
}