Move ChildActivity handling into base Activity class.

This commit is contained in:
tovl
2019-04-30 22:45:02 +02:00
committed by teinarss
parent 37379daf3c
commit b9c302a73a
43 changed files with 139 additions and 342 deletions

View File

@@ -33,22 +33,15 @@ namespace OpenRA.Mods.Common.Activities
{
// Turn to the required facing.
if (deploy.DeployState == DeployState.Undeployed && deploy.Info.Facing != -1 && canTurn && !moving)
QueueChild(self, new Turn(self, deploy.Info.Facing));
QueueChild(new Turn(self, deploy.Info.Facing));
}
public override Activity Tick(Actor self)
{
if (ChildActivity != null)
{
ChildActivity = ActivityUtils.RunActivity(self, ChildActivity);
if (ChildActivity != null)
return this;
}
if (IsCanceling || initiated || (deploy.DeployState != DeployState.Deployed && moving))
return NextActivity;
QueueChild(self, new DeployInner(self, deploy), true);
QueueChild(new DeployInner(self, deploy));
initiated = true;
return this;