Player changes direction only when on the ground, not in the air.  Revert this commit if this is not intended (code in the history would then be for reference).