fix trait ordering, via ITraitPrerequisite<>. We'll need to do this for other traits, later (I've just fixed the crashbug)

This commit is contained in:
Bob
2010-01-30 18:37:27 +13:00
parent 43a27bcfa0
commit c012cf3c7f
4 changed files with 37 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ namespace OpenRa
Info = Rules.Info[name.ToLowerInvariant()];
Health = this.GetMaxHP();
foreach (var trait in Info.Traits.WithInterface<ITraitInfo>())
foreach (var trait in Info.TraitsInConstructOrder())
traits.Add(trait.Create(this));
}
}