From 14be8cdefb51a082250275410fec48d92cd4f583 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 27 Dec 2020 19:01:24 +0100 Subject: [PATCH] Map vote: reset keyboard selection in a simpler way in MapVote_InputEvent --- qcsrc/client/mapvoting.qc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index d6ee23046..0b60bfcad 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -339,7 +339,6 @@ float MapVote_Selection(vector topleft, vector cellsize, float rows, float colum return mv_mouse_selection; } -vector prev_mousepos; // draws map vote or gametype vote void MapVote_Draw() { @@ -357,15 +356,6 @@ void MapVote_Draw() HUD_Panel_LoadCvars(); - if (!autocvar_hud_cursormode) - { - if (mousepos.x != prev_mousepos.x || mousepos.y != prev_mousepos.y) - { - mv_selection_keyboard = 0; - prev_mousepos = mousepos; - } - } - center = (vid_conwidth - 1)/2; xmin = vid_conwidth * 0.08; xmax = vid_conwidth - xmin; @@ -813,7 +803,10 @@ float MapVote_InputEvent(int bInputType, float nPrimary, float nSecondary) } if (bInputType == 2) + { + mv_selection_keyboard = 0; return false; + } // at this point bInputType can be 0 or 1 (key pressed or released) bool key_pressed = (bInputType == 0); -- 2.39.2