Let CreateGroup use ExtraActors field.
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using OpenRA.Network;
|
||||
using OpenRA.Traits;
|
||||
|
||||
@@ -271,7 +270,7 @@ namespace OpenRA
|
||||
minLength += 4 + 1 + 13 + (TargetString != null ? TargetString.Length + 1 : 0) + 4 + 4 + 4;
|
||||
|
||||
if (ExtraActors != null)
|
||||
minLength += ExtraActors.Count() * 4;
|
||||
minLength += ExtraActors.Length * 4;
|
||||
|
||||
// ProtocolVersion.Orders and the associated documentation MUST be updated if the serialized format changes
|
||||
var ret = new MemoryStream(minLength);
|
||||
@@ -352,7 +351,7 @@ namespace OpenRA
|
||||
|
||||
if (fields.HasField(OrderFields.ExtraActors))
|
||||
{
|
||||
w.Write(ExtraActors.Count());
|
||||
w.Write(ExtraActors.Length);
|
||||
foreach (var a in ExtraActors)
|
||||
w.Write(UIntFromActor(a));
|
||||
}
|
||||
|
||||
@@ -52,10 +52,7 @@ namespace OpenRA.Orders
|
||||
|
||||
// HACK: This is required by the hacky player actions-per-minute calculation
|
||||
// TODO: Reimplement APM properly and then remove this
|
||||
yield return new Order("CreateGroup", actorsInvolved.First().Owner.PlayerActor, false)
|
||||
{
|
||||
TargetString = actorsInvolved.Select(a => a.ActorID).JoinWith(",")
|
||||
};
|
||||
yield return new Order("CreateGroup", actorsInvolved.First().Owner.PlayerActor, false, actorsInvolved.ToArray());
|
||||
|
||||
foreach (var o in orders)
|
||||
yield return CheckSameOrder(o.Order, o.Trait.IssueOrder(o.Actor, o.Order, o.Target, mi.Modifiers.HasModifier(Modifiers.Shift)));
|
||||
|
||||
Reference in New Issue
Block a user