summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5ec7452)
raw | patch | inline | side by side (parent: 5ec7452)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Wed, 1 May 2019 17:21:21 +0000 (20:21 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Wed, 1 May 2019 17:21:21 +0000 (20:21 +0300) |
src/game/g_console.pas | patch | blob | history |
diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index 9a2bd99f3eb24d52b86d0acff0effd80caa69cd5..6757bfc51e5bd72f0bc99f7d4f878c7aa31e19b8 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
procedure g_Console_ProcessBind (key: Integer; down: Boolean);
var i: Integer;
begin
- if (not g_GUIGrabInput) and (not gChatShow) and (key >= 0) and (key < e_MaxInputKeys) and ((gInputBinds[key].down <> nil) or (gInputBinds[key].up <> nil)) then
+ if (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
- for i := 0 to High(gInputBinds[key].down) do
- g_Console_Process(gInputBinds[key].down[i], True)
+ begin
+ if (not g_GUIGrabInput) and (not gChatShow) and (not gConsoleShow) then
+ for i := 0 to High(gInputBinds[key].down) do
+ g_Console_Process(gInputBinds[key].down[i], True);
+ end
else
for i := 0 to High(gInputBinds[key].up) do
g_Console_Process(gInputBinds[key].up[i], True)