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()))
|
foreach (var actor in world.Actors.Where(a => a.IsInWorld && a.Owner == allies && !a.IsDead()))
|
||||||
{
|
{
|
||||||
var at = actor.TraitOrDefault<AutoTarget>();
|
actor.Trait<AutoTarget>().stance = UnitStance.Defend;
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -402,10 +402,7 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Game.IsHost)
|
queue.ResolveOrder(queue.self, Order.StartProduction(queue.self, unit, 1));
|
||||||
{
|
|
||||||
world.IssueOrder(Order.StartProduction(queue.self, unit, 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpawnSignalFlare()
|
void SpawnSignalFlare()
|
||||||
|
|||||||
@@ -278,10 +278,7 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Game.IsHost)
|
queue.ResolveOrder(queue.self, Order.StartProduction(queue.self, YakName, 1));
|
||||||
{
|
|
||||||
world.IssueOrder(Order.StartProduction(queue.self, YakName, 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerable<Actor> SovietAircraft()
|
IEnumerable<Actor> SovietAircraft()
|
||||||
|
|||||||
Reference in New Issue
Block a user