From d55f014928eab3a1a024ec27cccade481f175c5b Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 22 Jul 2013 16:58:14 -0500 Subject: Fix bind commands getting run when closing UI Introduced in commit "Add togglemenu command" bf2b04. Don't let UI key event changing key catcher affect bind parsing. Bind parsing itself will never change the key catcher. Example of issue: if mouse1 is bound to +attack when clicking Resume Game, player will shoot until releasing the mouse button. Mouse button should have to be released and pressed again before player will shoot. --- src/client/cl_keys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/cl_keys.c b/src/client/cl_keys.c index c9c8af53..b1c81e65 100644 --- a/src/client/cl_keys.c +++ b/src/client/cl_keys.c @@ -1213,6 +1213,9 @@ void CL_KeyDownEvent( int key, unsigned time ) return; } + // send the bound action + CL_ParseBinding( key, qtrue, time ); + // distribute the key down event to the apropriate handler if ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) { Console_Key( key ); @@ -1227,9 +1230,6 @@ void CL_KeyDownEvent( int key, unsigned time ) } else if ( clc.state == CA_DISCONNECTED ) { Console_Key( key ); } - - // send the bound action - CL_ParseBinding( key, qtrue, time ); } /* -- cgit