Change animations to use the proper SequenceProvider
Remove references to the global "Game" and use the SequenceProvider of the current world/map.
This commit is contained in:
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
var rs = self.Trait<RenderSprites>();
|
||||
var body = self.Trait<IBodyOrientation>();
|
||||
|
||||
anim = new Animation(rs.GetImage(self), RenderSimple.MakeFacingFunc(self));
|
||||
anim = new Animation(self.World, rs.GetImage(self), RenderSimple.MakeFacingFunc(self));
|
||||
anim.Play(info.Sequence);
|
||||
rs.anims.Add("harvest_{0}".F(info.Sequence), new AnimationWithOffset(anim,
|
||||
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
|
||||
|
||||
Reference in New Issue
Block a user