]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/mapvoting.qc
Merge branch 'master' into Mario/cursor
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / mapvoting.qc
index 03e94dc7f304238bc916443bc4a6fbef512d7bc7..37cb59e082101f645ac197f6c224c12715f62bfd 100644 (file)
@@ -321,6 +321,7 @@ float MapVote_Selection(vector topleft, vector cellsize, float rows, float colum
        return mv_mouse_selection;
 }
 
+vector prev_mousepos;
 void MapVote_Draw()
 {
        string map;
@@ -339,10 +340,11 @@ void MapVote_Draw()
 
        if (!autocvar_hud_cursormode)
        {
-               vector mpos = mousepos;
-               update_mousepos();
-               if (mpos.x != mousepos.x || mpos.y != mousepos.y)
+               if (mousepos.x != prev_mousepos.x || mousepos.y != prev_mousepos.y)
+               {
                        mv_selection_keyboard = 0;
+                       prev_mousepos = mousepos;
+               }
        }
 
        center = (vid_conwidth - 1)/2;
@@ -485,8 +487,6 @@ void MapVote_Draw()
                pos.x = (xmax+xmin)*0.5;
                MapVote_DrawAbstain(pos, dist.x, xmax - xmin, tmp, i);
        }
-
-       draw_cursor_normal(mousepos, '1 1 1', panel_fg_alpha);
 }
 
 void Cmd_MapVote_MapDownload(int argc)
@@ -649,8 +649,7 @@ void GameTypeVote_ReadOption(int i)
 void MapVote_Init()
 {
        mv_active = 1;
-       if(autocvar_hud_cursormode) setcursormode(1);
-       else mousepos = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
+       if(!autocvar_hud_cursormode) mousepos = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
        mv_selection = -1;
        mv_selection_keyboard = 0;