Now the max distance takes into account staircase jumping