Closed SpiritQuaddicted closed 10 years ago
It looks like requiem.cfg is only executed if there is also an autoexec.cfg.
I believe this is to enforce that requiem.cfg should be executed after autoexec.cfg, but it fails to take into account the case where autoexec.cfg does not exist. (See Cmd_Exec_f in cmd.c.)
I think the saving works fine, it's just that when it doesn't get executed, some variables revert to other values, which (depending on cfg_savevars) will affect whether they get written back out to requiem.cfg when Quake shuts down.
Can you verify that the autoexec.cfg thing is the source of your problem? Even just an empty autoexec.cfg file in id1 (or whatever the gamedir is) should make requiem.cfg start behaving.
If that's the issue, then I assume the behavior we want is for requiem.cfg to be executed even in the absence of autoexec.cfg. (But still after autoexec.cfg if autoexec.cfg exists.) If you're on board with that I can look at the best way to fix it.
P.S. reQuiem's Cmd_Exec_f is doing some funky stuff in general. Another thing I noticed there is that when using a gamedir, it will still execute any autoexec.cfg in id1 before it executes autoexec.cfg in the gamedir. Which is kind of nice in most cases, but nonstandard/surprising.
Potential solution in the commit above. It's working for me so far.
Maybe it is just me but I have trouble getting reQuiem to save and load its settings (id1/requiem.cfg). cfg_savevars is set to 2 in game, then I quit. The requiem.cfg is created and "full of things". When I launch reQuiem again, it will not even try to load that file but use its defaults again, then on quitting, write out an almost empty requiem.cfg.