r3076 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jan 1 17:37:00 EST 2008


Author: div0
Date: 2008-01-01 17:37:00 -0500 (Tue, 01 Jan 2008)
New Revision: 3076

Modified:
   trunk/data/qcsrc/server/g_world.qc
Log:
fix bug that causes the code to execute an invalid changelevel command when the map list is broken


Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2008-01-01 22:03:51 UTC (rev 3075)
+++ trunk/data/qcsrc/server/g_world.qc	2008-01-01 22:37:00 UTC (rev 3076)
@@ -350,14 +350,14 @@
 	return TRUE;
 }
 
-#ifdef MAPINFO
-#else
 string Map_Filename(float position)
 {
-	// FIXME unused
+#ifdef MAPINFO
+	return strcat("maps/", argv(position), ".bsp");
+#else
 	return strcat("maps/", argv(position), ".mapcfg");
-}
 #endif
+}
 
 string strwords(string s, float w)
 {
@@ -397,16 +397,16 @@
 		if(Map_IsRecent(map_next))
 			return 0;
 	}
+	filename = Map_Filename(position);
 #ifdef MAPINFO
-	if(MapInfo_CheckMap(argv(position)))
+	if(MapInfo_CheckMap(map_next))
 #else
-	filename = Map_Filename(position);
 	if(TryFile(filename))
 #endif
 	{
 		if(pass == 2)
 			return 1;
-		if(MapHasRightSize(argv(position)))
+		if(MapHasRightSize(map_next))
 			return 1;
 		return 0;
 	}
@@ -514,9 +514,6 @@
 
 	imax = 42;
 
-	if(Map_Count <= 1)
-		return 0; // only one map, then always play this one
-
 	for(i = 0; i <= imax; ++i)
 	{
 		string newlist;




More information about the nexuiz-commits mailing list