Units that have turrets while deployed now move their turrets back to their initial positions before undeploying
- Tested in TS with all deployable units and did a quick check for obvious issues in TD and RA.
This commit is contained in:
@@ -24,8 +24,24 @@ namespace OpenRA.Mods.Common.Activities
|
||||
this.deploy = deploy;
|
||||
}
|
||||
|
||||
protected override void OnFirstRun(Actor self)
|
||||
{
|
||||
var tInfo = self.Info.TraitInfoOrDefault<TurretedInfo>();
|
||||
if (tInfo != null)
|
||||
QueueChild(new WaitForTurretAlignment(self, tInfo.InitialFacing));
|
||||
}
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
{
|
||||
if (ChildActivity != null)
|
||||
{
|
||||
ActivityUtils.RunActivity(self, ChildActivity);
|
||||
return this;
|
||||
}
|
||||
|
||||
if (IsCanceled)
|
||||
return NextActivity;
|
||||
|
||||
IsInterruptible = false; // must DEPLOY from now.
|
||||
deploy.Undeploy();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user