Skip to content

Block previous versions' config defaults with EXECVERSION consvar

mazmazz requested to merge execversion into 21-version

Implement EXECVERSION consvar, which triggers some filtering logic in CV_Command (sets consvars) to ignore specific cv settings if your player config is from a specific previous version. This way, we can impose new defaults.

After loading a config, the EXECVERSION is reset to current modversion and unchangeable from console. When config is saved, EXECVERSION is always written first.

Older configs don't have this value, so it defaults to 25 (2.1.20). .21 configs will have this value set to 26.

Rationale

This came up in #coding-cube where Golden loaded .21 with a .20 config. We disabled vertical mouselook for third person, as well as mousemove. However, mousemove from a .20 config is still on by default, which invalidates our approach.

Simplest solution is to rename mousemove, but that's a hack. Plus, we'd want to filter other defaults with a bit more complex logic, like "does this config var match the previous default value?"

This branch currently blocks from pre-.21:

  • ALWAYSFREELOOK and MOUSEMOVE (changed paradigm to separate first/third person vertical look)
  • MOUSESENS, MOUSESENSY, MOUSE2SENS, MOUSE2SENSY values (made less sensitive)
    • ONLY if matches previous default 35
  • USE_JOYSTICK and USE_JOYSTICK2 (made to pick up joysticks by default)
    • ONLY if matches previous default 0
  • Joystick axis values (set to 360 controller defaults)
    • ONLY if ALL axis values are default
Edited by mazmazz

Merge request reports

Loading