refactor: simplify g_cvar.h - #86
Open
WofWca wants to merge 5 commits into
Open
Conversation
This is a follow-up to a6a90c7 (https://github.com/ec-/baseq3a/pull/83). I let AI do this since this is a trivial boilerplate change (but I of course reviewed and tested it (only the QVM build though, not DLL), and adjusted some whitespace stuff).
`modificationCount` is 0 for all the CVARs, so let's not require to specify it. If one needs to specify it, they can use the new `G_CVAR_EXT`. The declarations were edited with a simple `^((//)?\s?G_CVAR.*)0, ` -> `$1` regex replacement.
WofWca
force-pushed
the
g-simplify-cvar-declaration
branch
2 times, most recently
from
July 23, 2026 20:14
8272764 to
111e1e5
Compare
WofWca
marked this pull request as draft
July 23, 2026 20:20
Replace all `qfalse, NULL` with `NULL` Only `g_redteam` and `g_blueteam` have non-qfalse `teamShader`, so use `G_CVAR_EXT` for them.
So that you don't have to go to declaration every time you want to figure out what this `qfalse` and `qtrue` is referring to.
WofWca
force-pushed
the
g-simplify-cvar-declaration
branch
from
July 23, 2026 20:31
111e1e5 to
64380bc
Compare
WofWca
marked this pull request as ready for review
July 23, 2026 20:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO:
game#85, so review merge that first.Or just merge this one straight away.