height2jumpz

fixed height2jumpz(fixed height, fixed gravity)

Description

Converts jump height to JumpZ, assuming specified gravity.

Gravity is specified as acceleration, not as sv_gravity units.

Default gravity is 1.0.

Conversion formula

height = 0.5 * jumpz^2 / gravity

Examples

int jumpz = height2jumpz(8.0, 1.0);
print(s:"To jump 8 mapunits high in normal gravity, you need to set JumpZ to ", f:jumpz);