Merge pull request #2879 from bidifx/chat

closes #2874: improved ingame chat
This commit is contained in:
Matthias Mailänder
2013-03-30 00:40:47 -07:00
16 changed files with 255 additions and 61 deletions

View File

@@ -59,6 +59,7 @@ namespace OpenRA.Network
public string Bot; // Bot type, null for real clients
public bool IsAdmin;
public bool IsReady { get { return State == ClientState.Ready; } }
public bool IsObserver { get { return Slot == null; } }
}
public class Slot

View File

@@ -44,6 +44,7 @@ namespace OpenRA.Network
{
var player = world != null ? world.FindPlayerByClient(client) : null;
var suffix = (player != null && player.WinState == WinState.Lost) ? " (Dead)" : "";
suffix = client.IsObserver ? " (Spectator)" : suffix;
Game.AddChatLine(client.ColorRamp.GetColor(0), client.Name + suffix, order.TargetString);
}
else