r3825 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jul 14 10:12:32 EDT 2008
Author: div0
Date: 2008-07-14 10:12:31 -0400 (Mon, 14 Jul 2008)
New Revision: 3825
Modified:
trunk/data/qcsrc/server/g_world.qc
Log:
fix the suggestions[-1] bug
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2008-07-14 13:07:25 UTC (rev 3824)
+++ trunk/data/qcsrc/server/g_world.qc 2008-07-14 14:12:31 UTC (rev 3825)
@@ -2024,8 +2024,9 @@
nmax = min(MAPVOTE_COUNT, cvar("g_maplist_votable"));
smax = min3(nmax, cvar("g_maplist_votable_suggestions"), mapvote_suggestion_ptr);
- 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