]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
fixed drifting mouse pointer problems in menu
[xonotic/darkplaces.git] / clvm_cmds.c
index 83aa12a652f679689e1a7d49a03d48c0e9e3eb23..d00769327d90346fc0df844f5f83ed09ebc920c8 100644 (file)
@@ -1112,7 +1112,9 @@ static void VM_CL_getmousepos(void)
 {
        VM_SAFEPARMCOUNT(0,VM_CL_getmousepos);
 
-       if (cl.csqc_wantsmousemove)
+       if (key_consoleactive || key_dest != key_game)
+               VectorSet(PRVM_G_VECTOR(OFS_RETURN), 0, 0, 0);
+       else if (cl.csqc_wantsmousemove)
                VectorSet(PRVM_G_VECTOR(OFS_RETURN), in_windowmouse_x * vid_conwidth.integer / vid.width, in_windowmouse_y * vid_conheight.integer / vid.height, 0);
        else
                VectorSet(PRVM_G_VECTOR(OFS_RETURN), in_mouse_x * vid_conwidth.integer / vid.width, in_mouse_y * vid_conheight.integer / vid.height, 0);