From efadc1f305ab09388e8baf396a8dda66b69b74a9 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Wed, 1 May 2019 23:12:36 +0300 Subject: [PATCH] alternate bind workaround --- src/game/g_console.pas | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/game/g_console.pas b/src/game/g_console.pas index 6757bfc..4866ea1 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -719,13 +719,15 @@ begin end; 'togglechat': begin - g_Console_Chat_Switch; + if not gConsoleShow and (g_ActiveWindow = nil) then + g_Console_Chat_Switch; gSkipFirstChar := not g_Console_Interactive() end; 'toggleteamchat': if gGameSettings.GameMode in [GM_TDM, GM_CTF] then begin - g_Console_Chat_Switch(True); + if not gConsoleShow and (g_ActiveWindow = nil) then + g_Console_Chat_Switch(True); gSkipFirstChar := not g_Console_Interactive() end; end @@ -1727,14 +1729,11 @@ end; procedure g_Console_ProcessBind (key: Integer; down: Boolean); var i: Integer; begin - if (key >= 0) and (key < e_MaxInputKeys) and ((gInputBinds[key].down <> nil) or (gInputBinds[key].up <> nil)) then + if (not g_GUIGrabInput) and (key >= 0) and (key < e_MaxInputKeys) and ((gInputBinds[key].down <> nil) or (gInputBinds[key].up <> nil)) then begin - // down binds shouldn't be processed when there's no input focus - // however when the user releases a button the bind should still be processed - // to avoid "sticky" buttons if down then begin - if (not g_GUIGrabInput) and (not gChatShow) and (not gConsoleShow) then + if not gChatShow then for i := 0 to High(gInputBinds[key].down) do g_Console_Process(gInputBinds[key].down[i], True); end -- 2.29.2