Save position when leaving the game.