Bug #1023

Loading profile overwrites cvars / fix CVAR_ROM flagged cvars behaviour

Added by Mateos over 2 years ago. Updated over 1 year ago.

Status:In Progress% Done:

40%

Priority:NormalSpent time:-
Assignee:-
Category:Client
Target version:2.78
OS: Arch:

Description

If you load a different profile than the default one through a parameter given to the executable, or ingame within the menu load a profile, the one loaded will get its cvars overwritten, especially the name one, which isn’t a correct behaviour, at least different from vanilla.


Related issues

Related to ET: Legacy Development - Bug #266: fs_game does not recognize profile New 25.03.2013

Associated revisions

Revision 06352580
Added by IR4T4 over 2 years ago

ui: fix switching profiles refs #1023

Revision 667249cb
Added by Spyhawk over 2 years ago

ui: fixed various menu space errors and cleanup, refs #1023

Revision 9636c176
Added by IR4T4 over 2 years ago

qcommon: do no longer register (CVAR_ROM | CVAR_ARCHIVE) flagged cvars

History

#1 Updated by Spyhawk over 2 years ago

  • Category set to Client
  • Target version set to 2.76

#2 Updated by Spyhawk over 2 years ago

  • Related to Bug #266: fs_game does not recognize profile added

#3 Updated by Spyhawk over 2 years ago

  • Subject changed from Profile loading behaviour to Loading profile overwrites cvars

#4 Updated by Spyhawk over 2 years ago

Looks more like the profile can’t be switched. After creating a new profile with ETL, I cannot switch back to the old profile (through the menu):

Warning: Unknown UI script: clearPID;
Warning: Unknown UI script: applyProfile;
Warning: Unknown UI script: loadCachedServers;

#5 Updated by IR4T4 over 2 years ago

I’ve just fixed the switch profile bug. Kind of interesting: there is a need for a space between script command call and the separator.

#6 Updated by Spyhawk over 2 years ago

Thx! In addition, I checked all menu files and fixed a few similar errors here and there.

#7 Updated by Mateos over 2 years ago

Thank you guys o/

#8 Updated by IR4T4 over 2 years ago

  • Status changed from New to Feedback
  • Assignee set to Mateos
  • % Done changed from 0 to 50

#9 Updated by IR4T4 over 2 years ago

  • % Done changed from 50 to 40

+set cl_profile via start parameter doesn’t work properly:

———————————————————————————————————————-
ET:L crashed last time it was running. Do you want to reset settings to default values?

Note:
If you are running several client instances ensure a different value
of CVAR fs_homepath is set for each client.
Otherwise the same profile path is used which may cause other side effects.
———————————————————————————————————————-

We still have an issue with the pid file when profile is switched via the menu. The pid file is kept when we close ETL?!
While playing around with this the profile name of 1 was used in profile 2 which might be related to the answer of above reset to default question.
I stumbled also into the menu to create the profile again although is does exist.

#10 Updated by IR4T4 over 2 years ago

  • Assignee deleted (Mateos)

#11 Updated by IR4T4 over 2 years ago

  • Subject changed from Loading profile overwrites cvars to Loading profile overwrites cvars / fix CVAR_ROM flagged cvars behaviour
  • Status changed from Feedback to In Progress

The game isn’t designed to set cvars with ROM flag via console or as start param.

see q_shared.c
#define CVAR_ROM 64 ///< display only, cannot be set by user at all

and ui_main.c
{ &cl_profile, "cl_profile", "", CVAR_ROM },


1. Fix Com_StartupVariable and exclude CVAR_ROM flagged cvars to be set.
2. Deny CVAR_ROM flagged cvars to be set via console

#12 Updated by IR4T4 over 1 year ago

  • Target version changed from 2.76 to 2.78

Also available in: Atom PDF