r2256 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Mar 26 09:38:44 EDT 2007


Author: div0
Date: 2007-03-26 09:38:43 -0400 (Mon, 26 Mar 2007)
New Revision: 2256

Modified:
   trunk/data/qcsrc/server/g_world.qc
Log:
vote: suggestion flag missing


Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2007-03-26 12:30:05 UTC (rev 2255)
+++ trunk/data/qcsrc/server/g_world.qc	2007-03-26 13:38:43 UTC (rev 2256)
@@ -1784,7 +1784,7 @@
 	return "Suggestion accepted.";
 }
 
-void MapVote_AddVotable(string nextMap)
+void MapVote_AddVotable(string nextMap, float isSuggestion)
 {
 	float j;
 	if(nextMap == "")
@@ -1795,7 +1795,7 @@
 	if(strlen(nextMap) > mapvote_maxlen)
 		mapvote_maxlen = strlen(nextMap);
 	mapvote_maps[mapvote_count] = strzone(nextMap);
-	mapvote_maps_suggested[mapvote_count] = TRUE;
+	mapvote_maps_suggested[mapvote_count] = isSuggestion;
 	mapvote_count += 1;
 }
 
@@ -1811,17 +1811,17 @@
 	mapvote_count = 0;
 
 	for(i = 0; i < 100 && mapvote_count < smax; ++i)
-		MapVote_AddVotable(mapvote_suggestions[ceil(random() * mapvote_suggestion_ptr) - 1]);
+		MapVote_AddVotable(mapvote_suggestions[ceil(random() * mapvote_suggestion_ptr) - 1], TRUE);
 
 	for(i = 0; i < 100 && mapvote_count < nmax; ++i)
-		MapVote_AddVotable(GetNextMap());
+		MapVote_AddVotable(GetNextMap(), FALSE);
 
 	if(mapvote_count == 0)
 	{
 		bprint( "Maplist contains no single playable map!  Resetting it to default map list.\n" );
 		cvar_set("g_maplist", cvar_string("g_maplist_defaultlist"));
 		for(i = 0; i < 100 && mapvote_count < nmax; ++i)
-			MapVote_AddVotable(GetNextMap());
+			MapVote_AddVotable(GetNextMap(), FALSE);
 	}
 
 	//dprint("mapvote count is ", ftos(mapvote_count), "\n");




More information about the nexuiz-commits mailing list