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
local newfarclip = floor((fps/requestedfps)*(GetCVar("farclip")))
SetCVar("farclip", newfarclip)
end
Any ideas? I can pastebin my LUA if anyone wants to take a look.