Skip to content

Conversation

@slipher
Copy link
Member

@slipher slipher commented Dec 7, 2025

For example if you do /seta common.framerate.max 30 then /set common.framerate.max 31, the second command does not write out the cvars although it should since it still has the archive flag added by the first.

Remove the pointless `int flags` argument to Cvar::InternalSetValue
which is always 0.
A command such as /set common.framerate.max 99, when the cvar was
previously marked as archive, could fail to cause the configuration file
to be written out. This happened because the code relied on the flags
field of the C API cvar_t object to detect updates, but Cvar::AddFlags
failed to update cvar_t.

Note that setting cvars in the UI was not affected because the UI
re-adds the archive flag every time and the act of adding the flag
triggers an update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant