mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 22:40:50 +00:00
Make sure K_CONSOLE up events are ignored
otherwise we might get an error about an unbound key for up (!down) events.
This commit is contained in:
parent
a44225c625
commit
d6cdcc3e52
1 changed files with 6 additions and 3 deletions
|
@ -1196,9 +1196,12 @@ Key_Event(int key, qboolean down, qboolean special)
|
|||
}
|
||||
|
||||
/* Toogle console through Shift + Escape or special K_CONSOLE key */
|
||||
if ( down && ( key == K_CONSOLE || (keydown[K_SHIFT] && key == K_ESCAPE) ) )
|
||||
if (key == K_CONSOLE || (keydown[K_SHIFT] && key == K_ESCAPE))
|
||||
{
|
||||
Con_ToggleConsole_f();
|
||||
if (down)
|
||||
{
|
||||
Con_ToggleConsole_f();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1206,7 +1209,7 @@ Key_Event(int key, qboolean down, qboolean special)
|
|||
if ((key >= K_MOUSE1 && key != K_JOY_BACK) && !keybindings[key] && (cls.key_dest != key_console) &&
|
||||
(cls.state == ca_active))
|
||||
{
|
||||
Com_Printf("%s is unbound, hit F4 to set.\n", Key_KeynumToString(key));
|
||||
Com_Printf("%s (%d) is unbound, hit F4 to set.\n", Key_KeynumToString(key), key);
|
||||
}
|
||||
|
||||
/* While in attract loop all keys besides F1 to F12 (to
|
||||
|
|
Loading…
Reference in a new issue