closes #2874: improved ingame chat

This commit is contained in:
Sascha Biedermann
2013-03-28 18:39:26 +01:00
parent b4a2489874
commit 1eb7c62c62
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 IsObeserver { 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.IsObeserver ? " (Spectator)" : suffix;
Game.AddChatLine(client.ColorRamp.GetColor(0), client.Name + suffix, order.TargetString);
}
else