r4154 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Aug 23 07:55:48 EDT 2008


Author: div0
Date: 2008-08-23 07:55:42 -0400 (Sat, 23 Aug 2008)
New Revision: 4154

Modified:
   trunk/data/qcsrc/server/g_world.qc
Log:
fix deprecation warnings; remove support for "fog" in mapname.cfg as forced fog (the only map that needs it already has it in worldspawn)


Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2008-08-23 11:51:04 UTC (rev 4153)
+++ trunk/data/qcsrc/server/g_world.qc	2008-08-23 11:55:42 UTC (rev 4154)
@@ -336,57 +336,39 @@
 		cvar_set("timelimit", "0");
 	}
 
-	complain = (whichpack(strcat("maps/", mapname, ".cfg")) != "");
-	fd = fopen(strcat("maps/", mapname, ".cfg"), FILE_READ);
-	if(fd != -1)
+	if(whichpack(strcat("maps/", mapname, ".cfg")) != "")
 	{
-		while((s = fgets(fd)))
+		fd = fopen(strcat("maps/", mapname, ".cfg"), FILE_READ);
+		if(fd != -1)
 		{
-			l = tokenize(s);
-			if(l < 2)
-				continue;
-			if(argv(0) == "cd")
+			while((s = fgets(fd)))
 			{
-				if(complain)
+				l = tokenize(s);
+				if(l < 2)
+					continue;
+				if(argv(0) == "cd")
 				{
-					bprint("Found ^1DEPRECATED^7 cd loop command in .cfg file; put this line in mapinfo instead:\n");
-					bprint("  cdtrack ", argv(2), "\n");
+					print("Found ^1DEPRECATED^7 cd loop command in .cfg file; put this line in mapinfo instead:\n");
+					print("  cdtrack ", argv(2), "\n");
 				}
-			}
-			else if(argv(0) == "fog")
-			{
-				s = "";
-				while(l >= 2)
+				else if(argv(0) == "fog")
 				{
-					--l;
-					s = strcat(argv(l), " ", s);
+					print("Found ^1DEPRECATED^7 fog command in .cfg file; put this line in worldspawn in the .map/.bsp/.ent file instead:\n");
+					print("  \"fog\" \"", s, "\"\n");
 				}
-				s = substring(s, 0, strlen(s) - 1);
-				if(complain)
+				else if(argv(0) == "set")
 				{
-					bprint("Found ^1DEPRECATED^7 fog command in .cfg file; put this line in worldspawn in the .map/.bsp/.ent file instead:\n");
-					bprint("  \"fog\" \"", s, "\"\n");
+					print("Found ^1DEPRECATED^7 set command in .cfg file; put this line in mapinfo instead:\n");
+					print("  clientsettemp_for_type all ", argv(1), " ", argv(2), "\n");
 				}
-				world.fog = strzone(s);
-			}
-			else if(argv(0) == "set")
-			{
-				if(complain)
+				else if(argv(0) != "//")
 				{
-					bprint("Found ^1DEPRECATED^7 set command in .cfg file; put this line in mapinfo instead:\n");
-					bprint("  clientsettemp_for_type all ", argv(1), " ", argv(2), "\n");
+					print("Found ^1DEPRECATED^7 set command in .cfg file; put this line in mapinfo instead:\n");
+					print("  clientsettemp_for_type all ", argv(0), " ", argv(1), "\n");
 				}
 			}
-			else if(argv(0) != "//")
-			{
-				if(complain)
-				{
-					bprint("Found ^1DEPRECATED^7 set command in .cfg file; put this line in mapinfo instead:\n");
-					bprint("  clientsettemp_for_type all ", argv(0), " ", argv(1), "\n");
-				}
-			}
+			fclose(fd);
 		}
-		fclose(fd);
 	}
 
 	next_pingtime = time + 5;




More information about the nexuiz-commits mailing list