This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
functions:a_getcvarfixed [2017/04/15 16:58] – korshun | functions:a_getcvarfixed [2017/06/16 13:25] (current) – korshun | ||
---|---|---|---|
Line 3: | Line 3: | ||
'' | '' | ||
- | <note important> | + | <note important> |
===== Description ===== | ===== Description ===== | ||
Returns the value of an int or float CVar as a fixed-point number. | Returns the value of an int or float CVar as a fixed-point number. | ||
- | Returns 0 if: | + | Returns 0 if the CVar doesn' |
- | * the CVar doesn' | + | |
- | * the CVar is a string that doesn' | + | |
- | * the CVar is not an integer, a float or a string. | + | |
- | The function works by calling [[zdoom> | + | The function works by calling [[zdoom> |
===== Examples ===== | ===== Examples ===== | ||
Line 19: | Line 16: | ||
int mul = a_GetCVarFixed(" | int mul = a_GetCVarFixed(" | ||
int value = FixedMul(x, mul); | int value = FixedMul(x, mul); | ||
+ | </ | ||
+ | |||
+ | From [[UpdateCursor]] source: | ||
+ | < | ||
+ | int sensitivity = a_GetCVarFixed(" | ||
+ | int speedX = FixedDiv(CursorSpeedX, | ||
+ | int speedY = FixedDiv(CursorSpeedY, | ||
</ | </ | ||
===== See also ===== | ===== See also ===== | ||
* [[GetUserCVarFixed]] | * [[GetUserCVarFixed]] |