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

(Created page.) |
m (Replaced deprecated {{Game name}} template with {{Software}} counterpart. Action performed by bot) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{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 {{Team Fortress 2|4}} the formula is <code>desiredGravity / ({{ent|sv_gravity}} * TFGameRules()->GetGravityMultiplier())</code>. | |||
== | ==Declaration== | ||
<source lang=cpp> | <source lang=cpp> | ||
float UTIL_ScaleForGravity( float desiredGravity ) | float UTIL_ScaleForGravity( float desiredGravity ); | ||
</source> | </source> | ||
==Examples== | ==Examples== | ||
{{todo|Add examples.}} | {{todo|Add examples.}} | ||
[[Category:Programming]] | |||
[[Category:UTIL]] |
Latest revision as of 07:37, 31 May 2024


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 Team Fortress 2 the formula is
desiredGravity / (sv_gravity * TFGameRules()->GetGravityMultiplier())
.
Declaration
float UTIL_ScaleForGravity( float desiredGravity );
Examples
Todo: Add examples.