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

@@ -37,13 +37,6 @@ namespace OpenRA.Mods.Common.Activities
public override Activity Tick(Actor self)
{
if (ChildActivity != null)
{
ChildActivity = ActivityUtils.RunActivity(self, ChildActivity);
if (ChildActivity != null)
return this;
}
if (IsCanceling || target.Type == TargetType.Invalid)
return NextActivity;
@@ -64,7 +57,7 @@ namespace OpenRA.Mods.Common.Activities
{
var turn = ActivityUtils.RunActivity(self, new Turn(self, facing));
if (turn != null)
QueueChild(self, turn);
QueueChild(turn);
return this;
}