Added checks to determine whether or not we are getting up or diving.