Merge pull request #10965 from RoosterDragon/actor-info-ordering
Strengthen trait ordering rules
This commit is contained in:
@@ -80,8 +80,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
upgradeManager = self.TraitOrDefault<UpgradeManager>();
|
||||
|
||||
// The upgrade manager exists, but may not have finished being created yet.
|
||||
// We'll defer the upgrades until the end of the tick, at which point it will be ready.
|
||||
if (Cloaked)
|
||||
GrantUpgrades(self);
|
||||
self.World.AddFrameEndTask(_ => GrantUpgrades(self));
|
||||
}
|
||||
|
||||
public bool Cloaked { get { return !IsTraitDisabled && remainingTime <= 0; } }
|
||||
|
||||
Reference in New Issue
Block a user