Updated CPos struct to use a bit field for all properties.
This commit is contained in:
@@ -128,7 +128,7 @@ namespace OpenRA
|
||||
{
|
||||
if (flags.HasField(OrderFields.TargetIsCell))
|
||||
{
|
||||
var cell = new CPos(r.ReadInt32(), r.ReadInt32(), r.ReadByte());
|
||||
var cell = new CPos(r.ReadInt32());
|
||||
var subCell = (SubCell)r.ReadByte();
|
||||
if (world != null)
|
||||
target = Target.FromCell(world, cell, subCell);
|
||||
@@ -146,7 +146,7 @@ namespace OpenRA
|
||||
|
||||
var targetString = flags.HasField(OrderFields.TargetString) ? r.ReadString() : null;
|
||||
var queued = flags.HasField(OrderFields.Queued);
|
||||
var extraLocation = flags.HasField(OrderFields.ExtraLocation) ? new CPos(r.ReadInt32(), r.ReadInt32(), r.ReadByte()) : CPos.Zero;
|
||||
var extraLocation = flags.HasField(OrderFields.ExtraLocation) ? new CPos(r.ReadInt32()) : CPos.Zero;
|
||||
var extraData = flags.HasField(OrderFields.ExtraData) ? r.ReadUInt32() : 0;
|
||||
|
||||
if (world == null)
|
||||
|
||||
Reference in New Issue
Block a user