Example #1
0
        public bool InqJumpVelocity(float extent, out float velocity_z)
        {
            velocity_z = 0.0f;

            var player = WorldObject as Player;

            if (player == null)
            {
                return(false);
            }

            var burden = InqBurden();

            if (burden == null)
            {
                return(false);
            }

            var stamina = player.Stamina.Current;

            var jumpSkill = player.GetCreatureSkill(Skill.Jump).Current;

            if (stamina == 0)
            {
                jumpSkill = 0;
            }

            var height = MovementSystem.GetJumpHeight((float)burden, jumpSkill, extent, 1.0f);

            velocity_z = (float)Math.Sqrt(height * 19.6);

            return(true);
        }
Example #2
0
 public bool InqJumpVelocity(float extent, ref float velocityZ)
 {
     velocityZ = MovementSystem.GetJumpHeight(1.0f, 100, 1.0f, 1.0f) * 19.6f;
     return(true);
 }