Terraria.Mount.JumpHeight C# (CSharp) Method

JumpHeight() public method

public JumpHeight ( float xVelocity ) : int
xVelocity float
return int
        public int JumpHeight(float xVelocity)
        {
            int num = this._data.jumpHeight;
            switch (this._type)
            {
                case 0:
                    num += (int)((double)Math.Abs(xVelocity) / 4.0);
                    break;
                case 1:
                    num += (int)((double)Math.Abs(xVelocity) / 2.5);
                    break;
                case 4:
                    if (this._frameState == 4)
                    {
                        num += 5;
                        break;
                    }
                    break;
            }
            return num;
        }