Error when changing animation of sprite if current direction does not exist
Error when changing animation of custom entity if current direction does not exist:
The sprite of a custom entity "witch" was initialized with direction 2, then I called
and then I got: Error: Illegal direction 2 for sprite 'npc/witch' in animation 'witch_mixing'.
Since the direction 2 does not exist for the new animation, the direction should be reseted to 0.