Move ChildActivity handling into base Activity class.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user