r2510 - in trunk/data: . qcsrc/menu qcsrc/menu/system

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon May 7 05:36:42 EDT 2007


Author: div0
Date: 2007-05-07 05:36:42 -0400 (Mon, 07 May 2007)
New Revision: 2510

Modified:
   trunk/data/high.cfg
   trunk/data/low.cfg
   trunk/data/med.cfg
   trunk/data/normal.cfg
   trunk/data/omg.cfg
   trunk/data/qcsrc/menu/gamecommand.qc
   trunk/data/qcsrc/menu/system/events.qc
   trunk/data/ultimate.cfg
   trunk/data/ultra.cfg
Log:
support for menu_cmd sync to reload all cvar objects - and using that in the video settings cfgs


Modified: trunk/data/high.cfg
===================================================================
--- trunk/data/high.cfg	2007-05-07 07:04:13 UTC (rev 2509)
+++ trunk/data/high.cfg	2007-05-07 09:36:42 UTC (rev 2510)
@@ -34,3 +34,5 @@
 r_sky 1
 r_depthfirst 1
 r_showsurfaces 0
+
+menu_cmd sync

Modified: trunk/data/low.cfg
===================================================================
--- trunk/data/low.cfg	2007-05-07 07:04:13 UTC (rev 2509)
+++ trunk/data/low.cfg	2007-05-07 09:36:42 UTC (rev 2510)
@@ -34,3 +34,5 @@
 r_sky 1
 r_depthfirst 0
 r_showsurfaces 0
+
+menu_cmd sync

Modified: trunk/data/med.cfg
===================================================================
--- trunk/data/med.cfg	2007-05-07 07:04:13 UTC (rev 2509)
+++ trunk/data/med.cfg	2007-05-07 09:36:42 UTC (rev 2510)
@@ -34,3 +34,5 @@
 r_sky 1
 r_depthfirst 0
 r_showsurfaces 0
+
+menu_cmd sync

Modified: trunk/data/normal.cfg
===================================================================
--- trunk/data/normal.cfg	2007-05-07 07:04:13 UTC (rev 2509)
+++ trunk/data/normal.cfg	2007-05-07 09:36:42 UTC (rev 2510)
@@ -34,3 +34,5 @@
 r_sky 1
 r_depthfirst 1
 r_showsurfaces 0
+
+menu_cmd sync

Modified: trunk/data/omg.cfg
===================================================================
--- trunk/data/omg.cfg	2007-05-07 07:04:13 UTC (rev 2509)
+++ trunk/data/omg.cfg	2007-05-07 09:36:42 UTC (rev 2510)
@@ -34,3 +34,5 @@
 r_sky 1
 r_depthfirst 0
 r_showsurfaces 1
+
+menu_cmd sync

Modified: trunk/data/qcsrc/menu/gamecommand.qc
===================================================================
--- trunk/data/qcsrc/menu/gamecommand.qc	2007-05-07 07:04:13 UTC (rev 2509)
+++ trunk/data/qcsrc/menu/gamecommand.qc	2007-05-07 09:36:42 UTC (rev 2510)
@@ -12,6 +12,8 @@
 	if(argv(0) == "help" || argc == 0)
 	{
 		print("Usage: menu_cmd COMMAND..., where possible commands are:\n");
+		print("  sync - reloads all cvars on the current menu page\n");
+		print("  directmenu ITEM - select a menu item as main item\n");
 		GameCommand_Generic("help");
 		return;
 	}
@@ -19,5 +21,29 @@
 	if(GameCommand_Generic(command))
 		return;
 
+	if(argv(0) == "sync")
+	{
+		for(self = null_entity; (self = nextent(self)); )
+			Raise_DataEvent(self, ITEM_DATA_SYNC);
+		/*
+		for(self = null_entity; (self = findstring(self, type, "Item_Data_Cvar")); )
+			Raise_DataEvent(self, ITEM_DATA_SYNC);
+		for(self = null_entity; (self = findstring(self, type, "Item_Data_ServerCvar")); )
+			Raise_DataEvent(self, ITEM_DATA_SYNC);
+		*/
+		return;
+	}
+
+	if(argv(0) == "directmenu") if(argc == 2)
+	{
+		entity newitem;
+		newitem = findstring(null_entity, name, argv(1));
+		if(newitem)
+			Menu_ActiveWindow = newitem;
+		else
+			print(argv(1), " not found.\n");
+		return;
+	}
+
 	print("Invalid command. For a list of supported commands, try menu_cmd help.\n");
 }

Modified: trunk/data/qcsrc/menu/system/events.qc
===================================================================
--- trunk/data/qcsrc/menu/system/events.qc	2007-05-07 07:04:13 UTC (rev 2509)
+++ trunk/data/qcsrc/menu/system/events.qc	2007-05-07 09:36:42 UTC (rev 2510)
@@ -376,16 +376,6 @@
 
 
 	Menu_CollectGarbage( false );
-
-	if(cvar_string("scmenu_campaign_goto") != "") { // debug code for the campaign
-		float level;
-		level = cvar("scmenu_campaign_goto");
-		cvar_set( "scmenu_campaign_goto", "" );
-		Campaign_JumpLevel(level);
-	} else if(cvar_string("scmenu_campaign_dump") != "") {
-		cvar_set( "scmenu_campaign_dump", "" );
-		Campaign_DumpLevels();
-	}
 }
 
 void() Menu_Draw =

Modified: trunk/data/ultimate.cfg
===================================================================
--- trunk/data/ultimate.cfg	2007-05-07 07:04:13 UTC (rev 2509)
+++ trunk/data/ultimate.cfg	2007-05-07 09:36:42 UTC (rev 2510)
@@ -34,3 +34,5 @@
 r_sky 1
 r_depthfirst 2
 r_showsurfaces 0
+
+menu_cmd sync

Modified: trunk/data/ultra.cfg
===================================================================
--- trunk/data/ultra.cfg	2007-05-07 07:04:13 UTC (rev 2509)
+++ trunk/data/ultra.cfg	2007-05-07 09:36:42 UTC (rev 2510)
@@ -34,3 +34,5 @@
 r_sky 1
 r_depthfirst 2
 r_showsurfaces 0
+
+menu_cmd sync




More information about the nexuiz-commits mailing list