GetGravityG

fixed GetGravityG()

Description

Reads sv_gravity and returns current gravity in standard acceleration units instead of sv_gravity units.

Default gravity is 1.0.

This function handles extremely large sv_gravity units by using IntDiv when sv_gravity is greater than SHORT_MAX, and using FixedDiv otherwise to preserve precision.

Not all values returned by GetGravityG can be used as parameters to SetGravityG. Some may be too large for SetGravity's fixed-point argument once multiplied by 800.