From 5d786f411f1e7d11732d1bf93766fd4b8d788e6d Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sun, 1 Sep 2019 18:33:29 +0200 Subject: [PATCH] Update comment in Activity.cs SequenceActivities() was removed. --- OpenRA.Game/Activities/Activity.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Activities/Activity.cs b/OpenRA.Game/Activities/Activity.cs index 1f1bcab23b..5169d5c21c 100644 --- a/OpenRA.Game/Activities/Activity.cs +++ b/OpenRA.Game/Activities/Activity.cs @@ -40,9 +40,11 @@ namespace OpenRA.Activities * Things to be aware of when writing activities: * * - Use "return true" at least once somewhere in the tick method. - * - Do not "reuse" (with "SequenceActivities", for example) activity objects that have already started running. + * - Do not "reuse" activity objects (by queuing them as next or child, for example) that have already started running. * Queue a new instance instead. * - Avoid calling actor.CancelActivity(). It is almost always a bug. Call activity.Cancel() instead. + * - Do not evaluate dynamic state (an actor's location, health, conditions, etc.) in the activity's constructor, + * as that might change before the activity gets to tick for the first time. Use the OnFirstRun() method instead. */ public abstract class Activity : IActivityInterface {