From: terencehill Date: Fri, 2 Jun 2023 23:00:57 +0000 (+0200) Subject: Map vote screen: fix abstain vote shown over the winner map X-Git-Tag: xonotic-v0.8.6~35 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2ea6e6feb77cf64eb08b1b5c83a1b29cb62944fc;p=xonotic%2Fxonotic-data.pk3dir.git Map vote screen: fix abstain vote shown over the winner map --- diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 9e6f6395b..7c3d80352 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -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)