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

View File

@@ -241,6 +241,8 @@ namespace OpenRa.Game
var group = Rules.UnitCategory[item]; var group = Rules.UnitCategory[item];
var producing = player.Producing(group); var producing = player.Producing(group);
Game.PlaySound("ramenu1.aud", false);
if (isLmb) if (isLmb)
{ {
if (producing == null) if (producing == null)