Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cvar overhaul #36

Open
Razish opened this issue Apr 13, 2020 · 0 comments
Open

cvar overhaul #36

Razish opened this issue Apr 13, 2020 · 0 comments
Assignees
Labels
P: low priority: low S: in progress status: in progress T: refactor type: refactor

Comments

@Razish
Copy link
Contributor

Razish commented Apr 13, 2020

  • move all cvar declarations to *_xcvar.h (e.g. bot_minPlayers)
  • expose cvar_t directly in modcode
  • push updates from engine -> modcode instead of modcode polling
    • Register() should have optional Update() func
    • store list of update funcs in cvar_t? think about cgame registering then unloading
  • separate "owning" vs "view" ptrs to cvars, owning registration should overwrite default value, description, flags etc)
  • no runtime Cvar_Get in engine (e.g. renderer, server/bot_debug)
    • refcount cvar_t registration, to track non-owning registrations
      e.g. cl_running is registered in renderer (rd-vanilla/) but owned by engine (qcommon/)
  • only save modified or user-created cvars
    • can later add "profiles" which represents state of all cvars
      "configs" are an additive series of commands, not state persistence
      ...which basically means a "profile" is cvar_restart; exec myChangedVars.cfg anyway
@Razish Razish added P: low priority: low S: in progress status: in progress T: refactor type: refactor labels Apr 19, 2020
@Razish Razish self-assigned this Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: low priority: low S: in progress status: in progress T: refactor type: refactor
Projects
None yet
Development

No branches or pull requests

1 participant