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:
@@ -36,7 +36,7 @@ namespace OpenRA.Widgets
|
||||
|
||||
if (Unit != null && Sequence != null)
|
||||
{
|
||||
var anim = new Animation(Unit, () => Facing);
|
||||
var anim = new Animation(worldRenderer.world, Unit, () => Facing);
|
||||
anim.PlayFetchIndex(Sequence, () => Frame);
|
||||
GetAnimation = () => anim;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user