Fix handling of player velocity, shadows might still be broken