Fix various Mods.Common animation traits not supporting actors having multiple sprite bodies

This commit is contained in:
reaperrr
2018-05-17 09:19:13 +02:00
committed by Matthias Mailänder
parent 0d0d2e0ae3
commit 9d24c40f92
10 changed files with 45 additions and 13 deletions

View File

@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Traits.Render
: base(info)
{
movement = init.Self.Trait<IMove>();
wsb = init.Self.TraitsImplementing<WithSpriteBody>().First(w => w.Info.Name == Info.Body);
wsb = init.Self.TraitsImplementing<WithSpriteBody>().Single(w => w.Info.Name == Info.Body);
}
void ITick.Tick(Actor self)