Add team chat for spectators
This commit is contained in:
@@ -81,13 +81,13 @@ namespace OpenRA.Network
|
||||
else
|
||||
{
|
||||
var player = world.FindPlayerByClient(client);
|
||||
if (player == null) return;
|
||||
|
||||
if ((world.LocalPlayer != null && player.Stances[world.LocalPlayer] == Stance.Ally) || player.WinState == WinState.Lost)
|
||||
if (player != null && ((world.LocalPlayer != null && player.Stances[world.LocalPlayer] == Stance.Ally) || player.WinState == WinState.Lost))
|
||||
{
|
||||
var suffix = player.WinState == WinState.Lost ? " (Dead)" : " (Team)";
|
||||
Game.AddChatLine(client.Color.RGB, client.Name + suffix, order.TargetString);
|
||||
}
|
||||
else if (orderManager.LocalClient != null && orderManager.LocalClient.IsObserver && client.IsObserver)
|
||||
Game.AddChatLine(client.Color.RGB, client.Name + " (Spectators)", order.TargetString);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user