Skip to content

Commit

Permalink
Fix binds not being repeated when key held down
Browse files Browse the repository at this point in the history
Closes ddnet#8699. Regression from ddnet#8685.
  • Loading branch information
Robyt3 committed Aug 8, 2024
1 parent 49bef9c commit 645a005
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/game/client/components/binds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 645a005

Please sign in to comment.