UTIL ScaleForGravity: Difference between revisions
Jump to navigation
Jump to search

No edit summary |
m (Now this is a stub) |
||
Line 1: | Line 1: | ||
{{lang|UTIL ScaleForGravity|title=<code>UTIL_ScaleForGravity</code>}} | {{lang|UTIL ScaleForGravity|title=<code>UTIL_ScaleForGravity</code>}}{{stub}} | ||
{{ent|UTIL_ScaleForGravity}} is a [[UTIL]] function that returns the passed gravity in relation to the world gravity; the formula used is <code>desiredGravity / {{ent|sv_gravity}}</code>, or for {{game name|tf2|name=Team Fortress 2}} the formula is <code>desiredGravity / ({{ent|sv_gravity}} * TFGameRules()->GetGravityMultiplier())</code>. | {{ent|UTIL_ScaleForGravity}} is a [[UTIL]] function that returns the passed gravity in relation to the world gravity; the formula used is <code>desiredGravity / {{ent|sv_gravity}}</code>, or for {{game name|tf2|name=Team Fortress 2}} the formula is <code>desiredGravity / ({{ent|sv_gravity}} * TFGameRules()->GetGravityMultiplier())</code>. | ||
Revision as of 04:24, 23 July 2023


UTIL_ScaleForGravity is a UTIL function that returns the passed gravity in relation to the world gravity; the formula used is desiredGravity / sv_gravity
, or for Template:Game name the formula is desiredGravity / (sv_gravity * TFGameRules()->GetGravityMultiplier())
.
Declaration
float UTIL_ScaleForGravity( float desiredGravity );
Examples
Todo: Add examples.