mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-10 12:01:43 +00:00
keys.c (Key_Event): Allow autorepeats in message (chat) mode; based on a
patch from Sander van Dijk. Rearrange the autorepeat condition checks a bit, based on uhexen2. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@522 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
7504e175e9
commit
9155f744d6
1 changed files with 11 additions and 2 deletions
11
Quake/keys.c
11
Quake/keys.c
|
@ -861,13 +861,22 @@ void Key_Event (int key, qboolean down)
|
|||
if (down)
|
||||
{
|
||||
key_repeats[key]++;
|
||||
if (key_dest != key_console && key_repeats[key] > 1 && !repeatkeys[key]) //johnfitz -- use repeatkeys[]
|
||||
if (key_repeats[key] > 1)
|
||||
{
|
||||
if (key_dest == key_console)
|
||||
goto autorep0;
|
||||
if (key_dest == key_message)
|
||||
goto autorep0;
|
||||
if (!repeatkeys[key]) //johnfitz -- use repeatkeys[]
|
||||
return; // ignore most autorepeats
|
||||
}
|
||||
|
||||
if (key >= 200 && !keybindings[key])
|
||||
Con_Printf ("%s is unbound, hit F4 to set.\n", Key_KeynumToString (key) );
|
||||
}
|
||||
|
||||
autorep0:
|
||||
|
||||
if (key == K_SHIFT)
|
||||
shift_down = down;
|
||||
|
||||
|
|
Loading…
Reference in a new issue