Fix WithSpriteBody crashes

This commit is contained in:
abcdefg30
2019-05-29 09:11:54 +02:00
committed by Paul Chote
parent 7a403c9af5
commit 1c965d812f
3 changed files with 13 additions and 3 deletions

View File

@@ -47,7 +47,6 @@ namespace OpenRA.Mods.Common.Traits.Render
{
this.info = info;
playerResources = init.Self.Owner.PlayerActor.Trait<PlayerResources>();
ConfigureAnimation(init.Self);
}
void ConfigureAnimation(Actor self)
@@ -65,7 +64,8 @@ namespace OpenRA.Mods.Common.Traits.Render
protected override void TraitEnabled(Actor self)
{
// Do nothing - we just want to disable the default WithSpriteBody implementation
base.TraitEnabled(self);
ConfigureAnimation(self);
}
public override void CancelCustomAnimation(Actor self)