Campaign: Don't rely on world.issueorder anymore
This commit is contained in:
@@ -299,16 +299,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
foreach (var actor in world.Actors.Where(a => a.IsInWorld && a.Owner == allies && !a.IsDead()))
|
||||
{
|
||||
var at = actor.TraitOrDefault<AutoTarget>();
|
||||
if (at != null)
|
||||
{
|
||||
at.predictedStance = UnitStance.Defend;
|
||||
}
|
||||
var order = new Order("SetUnitStance", actor, false) { TargetLocation = new CPos((int)UnitStance.Defend, 0) };
|
||||
if (Game.IsHost)
|
||||
{
|
||||
world.IssueOrder(order);
|
||||
}
|
||||
actor.Trait<AutoTarget>().stance = UnitStance.Defend;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -402,10 +402,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Game.IsHost)
|
||||
{
|
||||
world.IssueOrder(Order.StartProduction(queue.self, unit, 1));
|
||||
}
|
||||
queue.ResolveOrder(queue.self, Order.StartProduction(queue.self, unit, 1));
|
||||
}
|
||||
|
||||
void SpawnSignalFlare()
|
||||
|
||||
@@ -278,10 +278,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Game.IsHost)
|
||||
{
|
||||
world.IssueOrder(Order.StartProduction(queue.self, YakName, 1));
|
||||
}
|
||||
queue.ResolveOrder(queue.self, Order.StartProduction(queue.self, YakName, 1));
|
||||
}
|
||||
|
||||
IEnumerable<Actor> SovietAircraft()
|
||||
|
||||
Reference in New Issue
Block a user