From: havoc Date: Thu, 8 May 2008 17:59:11 +0000 (+0000) Subject: fixed drifting mouse pointer problems in menu X-Git-Tag: xonotic-v0.1.0preview~2239 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=5a6cacc0b2909f2b0f3b777aad9d9b8bb0180d14;p=xonotic%2Fdarkplaces.git fixed drifting mouse pointer problems in menu git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8293 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/clvm_cmds.c b/clvm_cmds.c index 83aa12a6..d0076932 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -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); diff --git a/mvm_cmds.c b/mvm_cmds.c index 34a0a22c..91bb2007 100644 --- a/mvm_cmds.c +++ b/mvm_cmds.c @@ -790,7 +790,9 @@ static void VM_M_getmousepos(void) { VM_SAFEPARMCOUNT(0,VM_M_getmousepos); - if (in_client_mouse) + if (key_consoleactive || (key_dest != key_menu && key_dest != key_menu_grabbed)) + VectorSet(PRVM_G_VECTOR(OFS_RETURN), 0, 0, 0); + else if (in_client_mouse) 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);