* (bug #4357) CVAR_ROM+CVAR_ARCHIVE is not read from q3config

This commit is contained in:
Tim Angus 2010-01-03 19:44:37 +00:00
parent a405637985
commit bb30f51f67
3 changed files with 21 additions and 14 deletions

View file

@ -174,13 +174,13 @@ static cvarTable_t cvarTable[] = {
{ &ui_arenasFile, "g_arenasFile", "", CVAR_INIT|CVAR_ROM },
{ &ui_botsFile, "g_botsFile", "", CVAR_INIT|CVAR_ROM },
{ &ui_spScores1, "g_spScores1", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spScores2, "g_spScores2", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spScores3, "g_spScores3", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spScores4, "g_spScores4", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spScores5, "g_spScores5", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spAwards, "g_spAwards", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spVideos, "g_spVideos", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spScores1, "g_spScores1", "", CVAR_ARCHIVE },
{ &ui_spScores2, "g_spScores2", "", CVAR_ARCHIVE },
{ &ui_spScores3, "g_spScores3", "", CVAR_ARCHIVE },
{ &ui_spScores4, "g_spScores4", "", CVAR_ARCHIVE },
{ &ui_spScores5, "g_spScores5", "", CVAR_ARCHIVE },
{ &ui_spAwards, "g_spAwards", "", CVAR_ARCHIVE },
{ &ui_spVideos, "g_spVideos", "", CVAR_ARCHIVE },
{ &ui_spSkill, "g_spSkill", "2", CVAR_ARCHIVE | CVAR_LATCH },
{ &ui_spSelection, "ui_spSelection", "", CVAR_ROM },

View file

@ -1164,6 +1164,13 @@ void Cvar_Register(vmCvar_t *vmCvar, const char *varName, const char *defaultVal
{
cvar_t *cv;
// There is code in Cvar_Get to prevent CVAR_ROM cvars being changed by the
// user. In other words CVAR_ARCHIVE and CVAR_ROM are mutually exclusive
// flags. Unfortunately some historical game code (including single player
// baseq3) sets both flags. We unset CVAR_ROM for such cvars.
if ((flags & (CVAR_ARCHIVE | CVAR_ROM)) == (CVAR_ARCHIVE | CVAR_ROM))
flags &= ~CVAR_ROM;
cv = Cvar_Get(varName, defaultValue, flags | CVAR_VM_CREATED);
if (!vmCvar)

View file

@ -5709,13 +5709,13 @@ static cvarTable_t cvarTable[] = {
{ &ui_arenasFile, "g_arenasFile", "", CVAR_INIT|CVAR_ROM },
{ &ui_botsFile, "g_botsFile", "", CVAR_INIT|CVAR_ROM },
{ &ui_spScores1, "g_spScores1", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spScores2, "g_spScores2", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spScores3, "g_spScores3", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spScores4, "g_spScores4", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spScores5, "g_spScores5", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spAwards, "g_spAwards", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spVideos, "g_spVideos", "", CVAR_ARCHIVE | CVAR_ROM },
{ &ui_spScores1, "g_spScores1", "", CVAR_ARCHIVE },
{ &ui_spScores2, "g_spScores2", "", CVAR_ARCHIVE },
{ &ui_spScores3, "g_spScores3", "", CVAR_ARCHIVE },
{ &ui_spScores4, "g_spScores4", "", CVAR_ARCHIVE },
{ &ui_spScores5, "g_spScores5", "", CVAR_ARCHIVE },
{ &ui_spAwards, "g_spAwards", "", CVAR_ARCHIVE },
{ &ui_spVideos, "g_spVideos", "", CVAR_ARCHIVE },
{ &ui_spSkill, "g_spSkill", "2", CVAR_ARCHIVE },
{ &ui_spSelection, "ui_spSelection", "", CVAR_ROM },