Fix teamchat in lobby
This commit is contained in:
@@ -39,17 +39,16 @@ namespace OpenRA.Network
|
|||||||
if (client != null)
|
if (client != null)
|
||||||
{
|
{
|
||||||
var player = Game.world.players.Values.FirstOrDefault(p => p.Index == client.Index);
|
var player = Game.world.players.Values.FirstOrDefault(p => p.Index == client.Index);
|
||||||
if (player != null)
|
var display = (world.GameHasStarted) ?
|
||||||
{
|
player != null && (Game.world.LocalPlayer != null && player.Stances[Game.world.LocalPlayer] == Stance.Ally
|
||||||
var isAlly = (world.GameHasStarted) ?
|
|| player.WinState == WinState.Lost) :
|
||||||
player != null && Game.world.LocalPlayer != null && player.Stances[Game.world.LocalPlayer] == Stance.Ally :
|
|
||||||
client == Game.LocalClient || (client.Team == Game.LocalClient.Team && client.Team != 0);
|
client == Game.LocalClient || (client.Team == Game.LocalClient.Team && client.Team != 0);
|
||||||
|
|
||||||
if (isAlly && player.WinState != WinState.Lost)
|
if (display)
|
||||||
Game.AddChatLine(client.Color1, client.Name + " (Team)", order.TargetString);
|
{
|
||||||
|
var suffix = (player != null && player.WinState == WinState.Lost) ? " (Dead)" : " (Team)";
|
||||||
|
Game.AddChatLine(client.Color1, client.Name + suffix, order.TargetString);
|
||||||
}
|
}
|
||||||
else if (player != null && player.WinState == WinState.Lost)
|
|
||||||
Game.AddChatLine(client.Color1, client.Name + " (Dead)", order.TargetString);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user