diff options
author | Zack Middleton <zturtleman@gmail.com> | 2013-07-22 16:58:14 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:33 +0100 |
commit | d55f014928eab3a1a024ec27cccade481f175c5b (patch) | |
tree | 7dfa8788b3f9b1de40ee2e87e1a75584acdf707c | |
parent | 342ac4847531ba846ca38103527a1fc018919f5b (diff) |
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.
-rw-r--r-- | src/client/cl_keys.c | 6 |
1 files 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 ); } /* |