Skip to content

refactor: simplify g_cvar.h - #86

Open
WofWca wants to merge 5 commits into
ec-:masterfrom
WofWca:g-simplify-cvar-declaration
Open

refactor: simplify g_cvar.h#86
WofWca wants to merge 5 commits into
ec-:masterfrom
WofWca:g-simplify-cvar-declaration

Conversation

@WofWca

@WofWca WofWca commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

TODO:

WofWca added 2 commits July 23, 2026 23:19
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
WofWca force-pushed the g-simplify-cvar-declaration branch 2 times, most recently from 8272764 to 111e1e5 Compare July 23, 2026 20:14
@WofWca
WofWca marked this pull request as draft July 23, 2026 20:20
WofWca added 3 commits July 24, 2026 00:23
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
WofWca force-pushed the g-simplify-cvar-declaration branch from 111e1e5 to 64380bc Compare July 23, 2026 20:31
@WofWca
WofWca marked this pull request as ready for review July 23, 2026 20:33
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