r3826 - in branches/nexuiz-2.0: . data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Jul 14 10:13:33 EDT 2008


Author: div0
Date: 2008-07-14 10:13:33 -0400 (Mon, 14 Jul 2008)
New Revision: 3826

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
Log:
r3825 | div0 | 2008-07-14 16:12:31 +0200 (Mon, 14 Jul 2008) | 2 lines
fix the suggestions[-1] bug

Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2008-07-14 14:12:31 UTC (rev 3825)
+++ branches/nexuiz-2.0/.patchsets	2008-07-14 14:13:33 UTC (rev 3826)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-3760,3762-3773,3777-3778,3787-3788,3790-3790,3796-3804,3807-3808,3817-3817,3822-3823
+revisions_applied = 1-3760,3762-3773,3777-3778,3787-3788,3790-3790,3796-3804,3807-3808,3817-3817,3822-3825

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2008-07-14 14:12:31 UTC (rev 3825)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2008-07-14 14:13:33 UTC (rev 3826)
@@ -1999,8 +1999,9 @@
 		nmax = min(MAPVOTE_COUNT, cvar("g_maplist_votable"));
 	smax = min(nmax, cvar("g_maplist_votable_suggestions"));
 
-	for(i = 0; i < 100 && mapvote_count < smax; ++i)
-		MapVote_AddVotable(mapvote_suggestions[ceil(random() * mapvote_suggestion_ptr) - 1], TRUE);
+	if(mapvote_suggestion_ptr)
+		for(i = 0; i < 100 && mapvote_count < smax; ++i)
+			MapVote_AddVotable(mapvote_suggestions[ceil(random() * mapvote_suggestion_ptr) - 1], TRUE);
 
 	for(i = 0; i < 100 && mapvote_count < nmax; ++i)
 		MapVote_AddVotable(GetNextMap(), FALSE);




More information about the nexuiz-commits mailing list