]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reduce too big map images when there are very few choices
authorterencehill <piuntn@gmail.com>
Tue, 14 Jul 2015 12:26:13 +0000 (14:26 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 26 Jul 2015 09:46:44 +0000 (11:46 +0200)
Signed-off-by: terencehill <piuntn@gmail.com>
qcsrc/client/mapvoting.qc

index 79cff99e3b8a5007e1f83f5451bef80cbd1f79fb..395f70f13322cfe253982a556e57563fb1e4e09c 100644 (file)
@@ -389,6 +389,9 @@ void MapVote_Draw()
        {
                tsize = dist.x - 10;
                isize = min(dist.y - 10, 0.75 * tsize);
+               float maxheight = (ymax - pos.y) / 1.5;
+               if (isize > maxheight)
+                       isize = maxheight;
        }
 
        mv_selection = MapVote_Selection(pos, dist, rows, mv_columns);