]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use the old hack (now fixed) instead of checking Menu_Active to prevent cursor from...
authorterencehill <piuntn@gmail.com>
Fri, 22 Apr 2016 17:28:09 +0000 (19:28 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 22 Apr 2016 17:28:09 +0000 (19:28 +0200)
qcsrc/menu/menu.qc

index 913cdbe34b43f6bb068c7e8748e301da57386397..bde7fbe281ce1423e7dc4448ec7ca0e8ebc2dafd 100644 (file)
@@ -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);