]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mapvoting.qc
refactor RandomSelection, add a field for vector
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mapvoting.qc
index 29768893a727dc3730bb723dfdb38f25ee72fb5a..7c7c02018c2afb1f664cab59800734bdca75606b 100644 (file)
@@ -522,7 +522,7 @@ float MapVote_CheckRules_2()
        for(i = 0; i < mapvote_count_real; ++i)
                if ( mapvote_maps_flags[i] & GTV_AVAILABLE )
                {
-                       RandomSelection_Add(NULL, i, string_null, 1, mapvote_selections[i]);
+                       RandomSelection_AddFloat(i, 1, mapvote_selections[i]);
                        if ( gametypevote &&  mapvote_maps[i] == MapInfo_Type_ToString(MapInfo_CurrentGametype()) )
                        {
                                currentVotes = mapvote_selections[i];
@@ -542,7 +542,7 @@ float MapVote_CheckRules_2()
        for(i = 0; i < mapvote_count_real; ++i)
                if(i != firstPlace)
                if ( mapvote_maps_flags[i] & GTV_AVAILABLE )
-                       RandomSelection_Add(NULL, i, string_null, 1, mapvote_selections[i]);
+                       RandomSelection_AddFloat(i, 1, mapvote_selections[i]);
        secondPlace = RandomSelection_chosen_float;
        secondPlaceVotes = RandomSelection_best_priority;
        //dprint("Second place: ", ftos(secondPlace), "\n");