csqc should be able to detect key releases now. Also a small tweek to get K_* binds from prerelease working.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@995 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
47d159933d
commit
c35d18a7a3
1 changed files with 9 additions and 1 deletions
|
@ -727,6 +727,9 @@ int Key_StringToKeynum (char *str, int *modifier)
|
|||
if (!str[1]) //single char.
|
||||
return str[0];
|
||||
|
||||
if (!strncmp(str, "K_", 2))
|
||||
str+=2;
|
||||
|
||||
for (kn=keynames ; kn->name ; kn++)
|
||||
{
|
||||
if (!Q_strcasecmp(str,kn->name))
|
||||
|
@ -1221,6 +1224,12 @@ void Key_Event (int key, qboolean down)
|
|||
if (UI_KeyPress(key, down)) //Allow the UI to see the escape key. It is possible that a developer may get stuck at a menu.
|
||||
return;
|
||||
|
||||
#ifdef CSQC_DAT
|
||||
if (key_dest == key_game)
|
||||
if (CSQC_KeyPress(key, down)) //give csqc a chance to handle it.
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (!down)
|
||||
{
|
||||
if (key_dest == key_menu)
|
||||
|
@ -1313,7 +1322,6 @@ void Key_Event (int key, qboolean down)
|
|||
{
|
||||
if (UI_KeyPress(key, down) && down) //UI is allowed to take these keydowns. Keyups are always maintained.
|
||||
return;
|
||||
|
||||
#ifdef CSQC_DAT
|
||||
if (CSQC_KeyPress(key, down)) //give csqc a chance to handle it.
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue