Fix multi-turreted actors not appearing in the map editor.
This commit is contained in:
@@ -35,6 +35,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
IEnumerable<object> IActorPreviewInitInfo.ActorPreviewInits(ActorInfo ai, ActorPreviewType type)
|
||||
{
|
||||
// HACK: The ActorInit system does not support multiple instances of the same type
|
||||
// Make sure that we only return one TurretFacingInit, even for actors with multiple turrets
|
||||
if (ai.TraitInfos<TurretedInfo>().FirstOrDefault() == this)
|
||||
yield return new TurretFacingInit(PreviewFacing);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user