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.
This commit is contained in:
Zack Middleton 2013-07-22 16:58:14 -05:00
parent db85b61e94
commit 3518e7b22e

View file

@ -1267,6 +1267,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 );
@ -1283,9 +1286,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 );
}
/*