Fix the cursor running away and diagonal speed

It was possible for the cursor to get away from the captain, but now it
snaps back into the captain's range at all times. The cursor also now
moves at a constant speed, including when moving diagonally.