From c35d18a7a3d6e476419e7053216c765c72e4b5b9 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 8 May 2005 05:59:05 +0000 Subject: [PATCH] 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 --- engine/client/keys.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/engine/client/keys.c b/engine/client/keys.c index c56ee000f..20c0d1c88 100644 --- a/engine/client/keys.c +++ b/engine/client/keys.c @@ -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;