Issues with SetCVar
I've been working on an addon that dynamically adjusts draw distance based on FPS; I'll be adding many more "dynamic" settings to it once I've fleshed out the concept with farclip.
My issue is... In 4.0.6, I was able to use SetCVar("farclip", newfarclip) to change draw distance, and it was updated immediately. Now in 4.1, the same code isn't having the desired effect; What happens is the cvar is changed but the actual render distance stays the same. If I type /console print(GetCVar("farclip")), I get the expected new value assigned by my addon, yet the game world doesn't change to reflect this new value. Example: Farclip @ 1600 Getting 10 FPS out of 60; Addon responds by dropping farclip to 266 Rendered world does not change, but console reports farclip is now @ 266 A quick sample of how I go about this follows: Code:
if (fps/requestedfps) < 0.9 then |
Quote:
I just went on Live and tested out these commands and they both worked immediately for me .. Code:
/console farclip 25 |
Careful when using math on GetCVar, as it can return strings even for numerical settings. tonumber() works well.
|
All times are GMT -6. The time now is 07:52 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI