From 645a00551b9f3f74d9ffcbf27a896ea261376555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 8 Aug 2024 18:04:40 +0200 Subject: [PATCH] Fix binds not being repeated when key held down Closes #8699. Regression from #8685. --- src/game/client/components/binds.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/game/client/components/binds.cpp b/src/game/client/components/binds.cpp index eb01398c1..b03425b6a 100644 --- a/src/game/client/components/binds.cpp +++ b/src/game/client/components/binds.cpp @@ -150,6 +150,16 @@ bool CBinds::OnInput(const IInput::CEvent &Event) Handled = true; } } + else + { + // Repeat active bind while key is held down + // Have to check for nullptr again because the previous execute can unbind itself + if(m_aapKeyBindings[ActiveBind->m_ModifierMask][ActiveBind->m_Key]) + { + Console()->ExecuteLineStroked(1, m_aapKeyBindings[ActiveBind->m_ModifierMask][ActiveBind->m_Key]); + } + Handled = true; + } } if(Event.m_Flags & IInput::FLAG_RELEASE)