r3870 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Jul 21 11:52:25 EDT 2008


Author: div0
Date: 2008-07-21 11:52:25 -0400 (Mon, 21 Jul 2008)
New Revision: 3870

Modified:
   trunk/data/qcsrc/server/g_world.qc
Log:
Argh... use the RIGHT variable, whichpack then works better


Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2008-07-21 15:47:18 UTC (rev 3869)
+++ trunk/data/qcsrc/server/g_world.qc	2008-07-21 15:52:25 UTC (rev 3870)
@@ -2085,7 +2085,7 @@
 
 void MapVote_SendData(float targ)
 {
-	string mapfile;
+	string mapfile, pakfile;
 	float i, o;
 	WriteByte(targ, SVC_TEMPENTITY);
 	WriteByte(targ, TE_CSQC_CONFIG);
@@ -2109,14 +2109,15 @@
 		{
 			WriteString(targ, mapvote_maps[i]);
 			mapfile = strcat(mapvote_screenshot_dir, "/", mapvote_maps[i]);
-			mapfile = whichpack(strcat(mapfile, ".tga"));
-			if(mapfile == "")
-				mapfile = whichpack(strcat(mapfile, ".jpg"));
-			if(mapfile == "")
-				mapfile = whichpack(strcat(mapfile, ".png"));
-			for(o = strstr(mapfile, "/", 0)+1; o > 0; o = strstr(mapfile, "/", 0)+1)
-				mapfile = substring(mapfile, o, 999);
-			WriteString(targ, mapfile);
+			pakfile = whichpack(strcat(mapfile, ".tga"));
+			if(pakfile == "")
+				pakfile = whichpack(strcat(mapfile, ".jpg"));
+			if(pakfile == "")
+				pakfile = whichpack(strcat(mapfile, ".png"));
+			print("pakfile is ", pakfile, "\n");
+			for(o = strstr(pakfile, "/", 0)+1; o > 0; o = strstr(pakfile, "/", 0)+1)
+				pakfile = substring(pakfile, o, 999);
+			WriteString(targ, pakfile);
 		}
 }
 




More information about the nexuiz-commits mailing list