r3871 - in branches/nexuiz-2.0: . data/qcsrc/client data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Jul 21 11:53:09 EDT 2008


Author: div0
Date: 2008-07-21 11:53:08 -0400 (Mon, 21 Jul 2008)
New Revision: 3871

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc
   branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
Log:
r3869 | blub0 | 2008-07-21 17:47:18 +0200 (Mon, 21 Jul 2008) | 1 line
I suck today...
r3870 | div0 | 2008-07-21 17:52:25 +0200 (Mon, 21 Jul 2008) | 2 lines
Argh... use the RIGHT variable, whichpack then works better

Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2008-07-21 15:52:25 UTC (rev 3870)
+++ branches/nexuiz-2.0/.patchsets	2008-07-21 15:53:08 UTC (rev 3871)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-3866
+revisions_applied = 1-3870

Modified: branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc	2008-07-21 15:52:25 UTC (rev 3870)
+++ branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc	2008-07-21 15:53:08 UTC (rev 3871)
@@ -145,7 +145,7 @@
 	
 	isize = (ymax - pos_y - mv_num_maps*10) / mv_num_maps;
 	isize = min(isize, 64);
-	for(i = 0; i < (mv_num_maps - mv_abstain); ++i) // - mv_abstain safe? make sure it's 0 or 1
+	for(i = 0; i < (mv_num_maps - mv_abstain); ++i)
 	{
 		tmp = mv_votes[i]; // FTEQCC bug: too many array accesses in the function call screw it up
 		if(tmp < 0)

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2008-07-21 15:52:25 UTC (rev 3870)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2008-07-21 15:53:08 UTC (rev 3871)
@@ -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);
@@ -2099,6 +2099,7 @@
   	WriteByte(targ, mapvote_count);
   	WriteByte(targ, mapvote_abstain);
   	WriteByte(targ, mapvote_detail);
+	WriteByte(targ, mapvote_timeout - time);
  	if(mapvote_count <= 8)
  		WriteByte(targ, MapVote_GetMapMask());
  	else
@@ -2108,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