Adjust existing activities for changed NextActivity semantics
To make sure existing checks against NextActivity don't check the parent activity by mistake
This commit is contained in:
@@ -51,9 +51,12 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
{
|
||||
if (IsCanceled || NextActivity != null)
|
||||
if (IsCanceled)
|
||||
return NextActivity;
|
||||
|
||||
if (NextInQueue != null)
|
||||
return NextInQueue;
|
||||
|
||||
var deliver = new DeliverResources(self);
|
||||
|
||||
if (harv.IsFull)
|
||||
@@ -81,8 +84,8 @@ namespace OpenRA.Mods.Common.Activities
|
||||
var randFrames = self.World.SharedRandom.Next(100, 175);
|
||||
|
||||
// Avoid creating an activity cycle
|
||||
var next = NextActivity;
|
||||
NextActivity = null;
|
||||
var next = NextInQueue;
|
||||
NextInQueue = null;
|
||||
return ActivityUtils.SequenceActivities(next, new Wait(randFrames), this);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user