Since r1745 vm defined cvars that has both cvar_rom and cvar_archive does not get restored from q3config.cfg (they are written corrently). The most noteble example is g_spScores*.
The problem appears to be this channge:
- if ( ( var->flags & CVAR_USER_CREATED ) && !( flags & CVAR_USER_CREATED )
- && var_value[0] ) {
+ if(var->flags & CVAR_USER_CREATED)
+ {
Changing the line into:
if( (flags & CVAR_ROM) && !(flags & CVAR_ARCHIVE) ) {
can be used as a workaround.
I am not sure what is the best solution as it might break the game restart reset function.
Should values read from q3config even be marked as user created in the first place?
Created attachment 2219[details]
Remove the CVAR_ROM flag from single player states
I think it's cleaner to remove the ROM flag from the single player states. This is a cheap in-game security feature that could always be circumvented by changing the values in the config file.
(In reply to comment #2)
> Remove the CVAR_ROM flag from single player states
Absolutely the best way. Unfortunately it is not possible. There might be hundreds of mods relying on the old behavior including vanilla Q3 and that cannot be changed.
(In reply to comment #3)
> (In reply to comment #2)
> > Remove the CVAR_ROM flag from single player states
> Absolutely the best way. Unfortunately it is not possible. There might be
> hundreds of mods relying on the old behavior including vanilla Q3 and that
> cannot be changed.
That'd mean the original changes would have to be undone. I tried a handful of mods and couldn't produce problems.
If at all it only should affect single player mods. I tested none of these.
I made this change deliberately, because reverting it back to the old behaviour would allow any values that are declared read-only to be modified by the user. I didn't know at that time that some features of the game rely on this "bug".
Fixed in r1760. Technically it was getting read from q3config, it's just that it gets reset to the default when the ui module (later) registers the cvar.
Created attachment 2219 [details] Remove the CVAR_ROM flag from single player states I think it's cleaner to remove the ROM flag from the single player states. This is a cheap in-game security feature that could always be circumvented by changing the values in the config file.