diff --git a/OpenRA.Game/Network/Order.cs b/OpenRA.Game/Network/Order.cs index cc110f3147..4d5131927a 100755 --- a/OpenRA.Game/Network/Order.cs +++ b/OpenRA.Game/Network/Order.cs @@ -108,10 +108,7 @@ namespace OpenRA if (TargetActor != null) w.Write(UIntFromActor(TargetActor)); if (TargetLocation != int2.Zero) - { - w.Write(TargetLocation.X); - w.Write(TargetLocation.Y); - } + w.Write(TargetLocation); if (TargetString != null) w.Write(TargetString); diff --git a/OpenRA.Game/Network/OrderIO.cs b/OpenRA.Game/Network/OrderIO.cs index 9356bf9367..610824e2f0 100755 --- a/OpenRA.Game/Network/OrderIO.cs +++ b/OpenRA.Game/Network/OrderIO.cs @@ -8,10 +8,8 @@ */ #endregion -using System; using System.Collections.Generic; using System.IO; -using System.Linq; namespace OpenRA.Network { @@ -54,5 +52,11 @@ namespace OpenRA.Network var y = r.ReadInt32(); return new int2(x, y); } + + public static void Write(this BinaryWriter w, int2 p) + { + w.Write(p.X); + w.Write(p.Y); + } } }