]> 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 816945d2ab0bc9bbdcb50ef78f11b6f813a50597..acac831d76a181940782c1b074d7b5e0ef0b3d61 100644 (file)
@@ -525,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;
@@ -591,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;