fix indents everywhere
This commit is contained in:
@@ -18,7 +18,7 @@ using OpenRA.Support;
|
||||
|
||||
namespace OpenRA.Network
|
||||
{
|
||||
public enum ConnectionState
|
||||
public enum ConnectionState
|
||||
{
|
||||
PreConnecting,
|
||||
NotConnected,
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Network
|
||||
Connected,
|
||||
}
|
||||
|
||||
public interface IConnection : IDisposable
|
||||
public interface IConnection : IDisposable
|
||||
{
|
||||
int LocalClientId { get; }
|
||||
ConnectionState ConnectionState { get; }
|
||||
|
||||
@@ -44,17 +44,17 @@ namespace OpenRA.Network
|
||||
frameData.Add( clientId, orders );
|
||||
}
|
||||
|
||||
public bool IsReadyForFrame(int frame)
|
||||
{
|
||||
return !ClientsNotReadyForFrame(frame).Any();
|
||||
}
|
||||
public bool IsReadyForFrame(int frame)
|
||||
{
|
||||
return !ClientsNotReadyForFrame(frame).Any();
|
||||
}
|
||||
|
||||
public IEnumerable<int> ClientsNotReadyForFrame(int frame)
|
||||
{
|
||||
var frameData = framePackets.GetOrAdd(frame);
|
||||
return ClientsPlayingInFrame(frame)
|
||||
.Where(client => !frameData.ContainsKey(client));
|
||||
}
|
||||
public IEnumerable<int> ClientsNotReadyForFrame(int frame)
|
||||
{
|
||||
var frameData = framePackets.GetOrAdd(frame);
|
||||
return ClientsPlayingInFrame(frame)
|
||||
.Where(client => !frameData.ContainsKey(client));
|
||||
}
|
||||
|
||||
public IEnumerable<ClientOrder> OrdersForFrame( World world, int frame )
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace OpenRA
|
||||
|
||||
public Order(string orderstring, Order order)
|
||||
: this(orderstring, order.Subject, order.TargetActor, order.TargetLocation,
|
||||
order.TargetString, order.Queued, order.ExtraLocation) {}
|
||||
order.TargetString, order.Queued, order.ExtraLocation) {}
|
||||
|
||||
public byte[] Serialize()
|
||||
{
|
||||
@@ -85,7 +85,7 @@ namespace OpenRA
|
||||
{
|
||||
// Format:
|
||||
// u8 : orderID.
|
||||
// 0xFF: Full serialized order.
|
||||
// 0xFF: Full serialized order.
|
||||
// varies: rest of order.
|
||||
default:
|
||||
// TODO: specific serializers for specific orders.
|
||||
|
||||
@@ -16,7 +16,7 @@ using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Network
|
||||
{
|
||||
public class OrderManager : IDisposable
|
||||
public class OrderManager : IDisposable
|
||||
{
|
||||
readonly SyncReport syncReport;
|
||||
readonly FrameData frameData = new FrameData();
|
||||
@@ -157,17 +157,17 @@ namespace OpenRA.Network
|
||||
get { return NetFrameNumber >= 1 && frameData.IsReadyForFrame( NetFrameNumber ); }
|
||||
}
|
||||
|
||||
static readonly IEnumerable<Session.Client> NoClients = new Session.Client[] {};
|
||||
public IEnumerable<Session.Client> GetClientsNotReadyForNextFrame
|
||||
{
|
||||
get
|
||||
{
|
||||
return NetFrameNumber >= 1
|
||||
? frameData.ClientsNotReadyForFrame(NetFrameNumber)
|
||||
.Select(a => LobbyInfo.ClientWithIndex(a))
|
||||
: NoClients;
|
||||
}
|
||||
}
|
||||
static readonly IEnumerable<Session.Client> NoClients = new Session.Client[] {};
|
||||
public IEnumerable<Session.Client> GetClientsNotReadyForNextFrame
|
||||
{
|
||||
get
|
||||
{
|
||||
return NetFrameNumber >= 1
|
||||
? frameData.ClientsNotReadyForFrame(NetFrameNumber)
|
||||
.Select(a => LobbyInfo.ClientWithIndex(a))
|
||||
: NoClients;
|
||||
}
|
||||
}
|
||||
|
||||
public void Tick()
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace OpenRA.Network
|
||||
public class Client
|
||||
{
|
||||
public int Index;
|
||||
public ColorRamp ColorRamp;
|
||||
public ColorRamp ColorRamp;
|
||||
public string Country;
|
||||
public int SpawnPoint;
|
||||
public string Name;
|
||||
|
||||
@@ -65,8 +65,8 @@ namespace OpenRA.Network
|
||||
a.ActorID,
|
||||
a.Type,
|
||||
a.Owner,
|
||||
a.Trait,
|
||||
a.Hash
|
||||
a.Trait,
|
||||
a.Hash
|
||||
));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace OpenRA.Network
|
||||
if (world == null)
|
||||
{
|
||||
if (client.Team == orderManager.LocalClient.Team)
|
||||
Game.AddChatLine(client.ColorRamp.GetColor(0), client.Name + " (Team)",
|
||||
Game.AddChatLine(client.ColorRamp.GetColor(0), client.Name + " (Team)",
|
||||
order.TargetString);
|
||||
}
|
||||
else
|
||||
@@ -85,7 +85,7 @@ namespace OpenRA.Network
|
||||
var suffix = (player != null && player.WinState == WinState.Lost)
|
||||
? " (Dead)"
|
||||
: " (Team)";
|
||||
Game.AddChatLine(client.ColorRamp.GetColor(0), client.Name + suffix, order.TargetString);
|
||||
Game.AddChatLine(client.ColorRamp.GetColor(0), client.Name + suffix, order.TargetString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user