[quake3-commits] r1760 - in trunk/code: q3_ui qcommon ui

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Jan 3 14:44:37 EST 2010


Author: tma
Date: 2010-01-03 14:44:37 -0500 (Sun, 03 Jan 2010)
New Revision: 1760

Modified:
   trunk/code/q3_ui/ui_main.c
   trunk/code/qcommon/cvar.c
   trunk/code/ui/ui_main.c
Log:
* (bug #4357) CVAR_ROM+CVAR_ARCHIVE is not read from q3config


Modified: trunk/code/q3_ui/ui_main.c
===================================================================
--- trunk/code/q3_ui/ui_main.c	2009-12-24 01:39:30 UTC (rev 1759)
+++ trunk/code/q3_ui/ui_main.c	2010-01-03 19:44:37 UTC (rev 1760)
@@ -174,13 +174,13 @@
 
 	{ &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 },

Modified: trunk/code/qcommon/cvar.c
===================================================================
--- trunk/code/qcommon/cvar.c	2009-12-24 01:39:30 UTC (rev 1759)
+++ trunk/code/qcommon/cvar.c	2010-01-03 19:44:37 UTC (rev 1760)
@@ -1164,6 +1164,13 @@
 {
 	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)

Modified: trunk/code/ui/ui_main.c
===================================================================
--- trunk/code/ui/ui_main.c	2009-12-24 01:39:30 UTC (rev 1759)
+++ trunk/code/ui/ui_main.c	2010-01-03 19:44:37 UTC (rev 1760)
@@ -5709,13 +5709,13 @@
 
 	{ &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 },



More information about the quake3-commits mailing list