]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mapvoting.qc
fix sv_vote_gametype_default_current to match description
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mapvoting.qc
index 209ac7af98085daf7bdffed0fc335eacba721141..acac831d76a181940782c1b074d7b5e0ef0b3d61 100644 (file)
@@ -109,16 +109,8 @@ void MapVote_UnzoneStrings()
 {
        for(int j = 0; j < mapvote_count; ++j)
        {
-               if ( mapvote_maps[j] )
-               {
-                       strunzone(mapvote_maps[j]);
-                       mapvote_maps[j] = string_null;
-               }
-               if ( mapvote_maps_pakfile[j] )
-               {
-                       strunzone(mapvote_maps_pakfile[j]);
-                       mapvote_maps_pakfile[j] = string_null;
-               }
+               strfree(mapvote_maps[j]);
+               strfree(mapvote_maps_pakfile[j]);
        }
 }
 
@@ -533,7 +525,7 @@ bool MapVote_CheckRules_2()
                        }
                }
        firstPlaceVotes = RandomSelection_best_priority;
-       if ( autocvar_sv_vote_gametype_default_current && currentVotes == firstPlaceVotes )
+       if ( autocvar_sv_vote_gametype_default_current && firstPlaceVotes == 0 )
                firstPlace = currentPlace;
        else
                firstPlace = RandomSelection_chosen_float;
@@ -599,9 +591,9 @@ void MapVote_Tick()
        int totalvotes = 0;
        FOREACH_CLIENT(IS_REAL_CLIENT(it), {
                // hide scoreboard again
-               if(it.health != 2342)
+               if(GetResource(it, RES_HEALTH) != 2342)
                {
-                       it.health = 2342;
+                       SetResourceExplicit(it, RES_HEALTH, 2342);
                        CS(it).impulse = 0;
 
                        msg_entity = it;