]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Map vote screen: fix abstain vote shown over the winner map
authorterencehill <piuntn@gmail.com>
Fri, 2 Jun 2023 23:00:57 +0000 (01:00 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 2 Jun 2023 23:00:57 +0000 (01:00 +0200)
qcsrc/client/mapvoting.qc

index 9e6f6395b26750d003b8bf744a72ccf45332ec0c..7c3d803527d1e41ccc1a2630a8a94249beaff8c2 100644 (file)
@@ -512,6 +512,17 @@ void MapVote_Draw()
                else
                        DrawItem(pos + MapVote_GridVec(dist, i, mv_columns), dist.y, dist.x, map, "", tmp, i);
        }
+
+       if(mv_abstain)
+               ++mv_num_maps;
+
+       if(mv_abstain && i < mv_num_maps) {
+               tmp = mv_votes[i];
+               pos.y = ymax + abstain_spacing;
+               pos.x = (xmax + xmin) * 0.5;
+               MapVote_DrawAbstain(pos, dist.x, xmax - xmin, tmp, i);
+       }
+
        if (mv_winner)
        {
                // expand winner map image
@@ -536,16 +547,6 @@ void MapVote_Draw()
 
                MapVote_DrawMapPicture(mv_pics[mv_winner - 1], img_pos, img_size, theAlpha);
        }
-
-       if(mv_abstain)
-               ++mv_num_maps;
-
-       if(mv_abstain && i < mv_num_maps) {
-               tmp = mv_votes[i];
-               pos.y = ymax + abstain_spacing;
-               pos.x = (xmax+xmin)*0.5;
-               MapVote_DrawAbstain(pos, dist.x, xmax - xmin, tmp, i);
-       }
 }
 
 void Cmd_MapVote_MapDownload(int argc)