]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
If the menu gets closed do not update mouse position: it prevents mouse jumping to...
authorterencehill <piuntn@gmail.com>
Sun, 26 May 2013 10:32:26 +0000 (12:32 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 26 May 2013 10:32:26 +0000 (12:32 +0200)
qcsrc/menu/menu.qc

index 2dc73a8d22675d78d36d789408b907d6b40f2d75..a76efb8e367840cc3737734a781c104556bbe935 100644 (file)
@@ -784,7 +784,12 @@ void m_draw()
 
        draw_alpha *= menuAlpha;
 
-       if(menuMouseMode)
+       if(!Menu_Active)
+       {
+               // do not update mouse position
+               // it prevents mouse jumping to '0 0 0' when menu is fading out
+       }
+       else if(menuMouseMode)
        {
                vector newMouse;
                newMouse = globalToBox(getmousepos(), draw_shift, draw_scale);