The issue I have is sometimes the walk-left animation is playing (likely due to a previous "walk left" command) when the character is moving right.
That's the issue it resolves. I never said any solution about smooth animations, only to properly determine animations via input.
Basically what it does is specifically limits the sprite from doing the walk-left animation because walk-left is only valid if MIRRORED or BOOLEAN "left" is set to true.
Edit: realised you're using 8dir, my bad.