Simplify names, remove unused usings, remove redundant casts.
This commit is contained in:
@@ -68,7 +68,7 @@ namespace OpenRA.Network
|
||||
public virtual void SendImmediate(List<byte[]> orders)
|
||||
{
|
||||
var ms = new MemoryStream();
|
||||
ms.Write(BitConverter.GetBytes((int)0));
|
||||
ms.Write(BitConverter.GetBytes(0));
|
||||
foreach (var o in orders)
|
||||
ms.Write(o);
|
||||
Send(ms.ToArray());
|
||||
@@ -196,12 +196,12 @@ namespace OpenRA.Network
|
||||
try
|
||||
{
|
||||
var ms = new MemoryStream();
|
||||
ms.Write(BitConverter.GetBytes((int)packet.Length));
|
||||
ms.Write(BitConverter.GetBytes(packet.Length));
|
||||
ms.Write(packet);
|
||||
|
||||
foreach (var q in queuedSyncPackets)
|
||||
{
|
||||
ms.Write(BitConverter.GetBytes((int)q.Length));
|
||||
ms.Write(BitConverter.GetBytes(q.Length));
|
||||
ms.Write(q);
|
||||
base.Send(q);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using ICSharpCode.SharpZipLib.Core;
|
||||
using ICSharpCode.SharpZipLib.GZip;
|
||||
using MaxMind.GeoIP2;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using OpenRA.Network;
|
||||
|
||||
namespace OpenRA
|
||||
@@ -52,14 +51,14 @@ namespace OpenRA
|
||||
Order(string orderString, Actor subject,
|
||||
Actor targetActor, CPos targetLocation, string targetString, bool queued, CPos extraLocation, uint extraData)
|
||||
{
|
||||
this.OrderString = orderString;
|
||||
this.Subject = subject;
|
||||
this.TargetActor = targetActor;
|
||||
this.TargetLocation = targetLocation;
|
||||
this.TargetString = targetString;
|
||||
this.Queued = queued;
|
||||
this.ExtraLocation = extraLocation;
|
||||
this.ExtraData = extraData;
|
||||
OrderString = orderString;
|
||||
Subject = subject;
|
||||
TargetActor = targetActor;
|
||||
TargetLocation = targetLocation;
|
||||
TargetString = targetString;
|
||||
Queued = queued;
|
||||
ExtraLocation = extraLocation;
|
||||
ExtraData = extraData;
|
||||
}
|
||||
|
||||
public static Order Deserialize(World world, BinaryReader r)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
@@ -64,7 +63,7 @@ namespace OpenRA.Network
|
||||
}
|
||||
|
||||
file.Write(initialContent);
|
||||
this.writer = new BinaryWriter(file);
|
||||
writer = new BinaryWriter(file);
|
||||
}
|
||||
|
||||
public void Receive(int clientID, byte[] data)
|
||||
|
||||
Reference in New Issue
Block a user