Code cleanup.
This commit is contained in:
committed by
teinarss
parent
7735107deb
commit
ee95d2591f
@@ -22,7 +22,7 @@ namespace OpenRA.Network
|
||||
|
||||
static Player FindPlayerByClient(this World world, Session.Client c)
|
||||
{
|
||||
return world.Players.FirstOrDefault(p => (p.ClientIndex == c.Index && p.PlayerReference.Playable));
|
||||
return world.Players.FirstOrDefault(p => p.ClientIndex == c.Index && p.PlayerReference.Playable);
|
||||
}
|
||||
|
||||
internal static void ProcessOrder(OrderManager orderManager, World world, int clientId, Order order)
|
||||
@@ -63,7 +63,7 @@ namespace OpenRA.Network
|
||||
// ExtraData 0 means this is a normal chat order, everything else is team chat
|
||||
if (order.ExtraData == 0)
|
||||
{
|
||||
var p = world != null ? world.FindPlayerByClient(client) : null;
|
||||
var p = world?.FindPlayerByClient(client);
|
||||
var suffix = (p != null && p.WinState == WinState.Lost) ? " (Dead)" : "";
|
||||
suffix = client.IsObserver ? " (Spectator)" : suffix;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user