Possible fix for #2027, properly check Player onGround flag