From 4d32fd74a097714d962e8f7156f3aafbc6eb25c8 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 22 Apr 2016 19:28:09 +0200 Subject: [PATCH] Use the old hack (now fixed) instead of checking Menu_Active to prevent cursor from jumping to the upper left corner when hiding the menu; it's better because it now works when showing the console too --- qcsrc/menu/menu.qc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index 913cdbe34..bde7fbe28 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -790,15 +790,11 @@ void m_draw(float width, float height) draw_alpha *= menuAlpha; - if (!Menu_Active) + if (menuMouseMode) { - // do not update mouse position - // it prevents mouse jumping to '0 0 0' when menu is fading out - } - else if (menuMouseMode) - { - vector newMouse = globalToBox(getmousepos(), draw_shift, draw_scale); - if (newMouse != '0 0 0' && newMouse != menuMousePos) + vector rawMousePos = getmousepos(); + vector newMouse = globalToBox(rawMousePos, draw_shift, draw_scale); + if (rawMousePos != '0 0 0' && newMouse != menuMousePos) { menuMousePos = newMouse; if (mouseButtonsPressed) main.mouseDrag(main, menuMousePos); -- 2.39.2