added logic that makes characters use the correct walking animation when they are moved