- if((player->dir == ::LEFT && scrollchange == RIGHT)
- || (player->dir == ::RIGHT && scrollchange == LEFT))
+
+
+ // Find out direction in which the player walks: We want to try and show a
+ // bit more of what's in front of the player and less of what's behind
+ LeftRightScrollChange walkDirection;
+ if (player->physic.get_velocity_x() < -EPSILON) walkDirection = LEFT;
+ else if (player->physic.get_velocity_x() > EPSILON) walkDirection = RIGHT;
+ else if (player->dir == ::LEFT) walkDirection = LEFT;
+ else walkDirection = RIGHT;
+
+
+ if((walkDirection == LEFT && scrollchange == RIGHT)
+ || (walkDirection == RIGHT && scrollchange == LEFT))