mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 03:58:18 +00:00
Fix ctrl+shift+d moving tee (fixes #2930)
This commit is contained in:
parent
6beab4a42b
commit
9b0081de57
|
@ -54,7 +54,7 @@ void CBinds::Bind(int KeyID, const char *pStr, bool FreeOnly, int Modifier)
|
||||||
|
|
||||||
// skip modifiers for +xxx binds
|
// skip modifiers for +xxx binds
|
||||||
if(pStr[0] == '+')
|
if(pStr[0] == '+')
|
||||||
Modifier = 0;
|
Modifier = 1 << MODIFIER_NONE;
|
||||||
|
|
||||||
char aBuf[256];
|
char aBuf[256];
|
||||||
if(!pStr[0])
|
if(!pStr[0])
|
||||||
|
@ -130,7 +130,6 @@ bool CBinds::OnInput(IInput::CEvent e)
|
||||||
if(!Mask)
|
if(!Mask)
|
||||||
Mask = 1 << MODIFIER_NONE;
|
Mask = 1 << MODIFIER_NONE;
|
||||||
|
|
||||||
bool ret = false;
|
|
||||||
for(int Mod = 1; Mod < MODIFIER_COMBINATION_COUNT; Mod++)
|
for(int Mod = 1; Mod < MODIFIER_COMBINATION_COUNT; Mod++)
|
||||||
{
|
{
|
||||||
if(m_aapKeyBindings[Mod][e.m_Key] && (Mask == Mod))
|
if(m_aapKeyBindings[Mod][e.m_Key] && (Mask == Mod))
|
||||||
|
@ -139,20 +138,11 @@ bool CBinds::OnInput(IInput::CEvent e)
|
||||||
Console()->ExecuteLineStroked(1, m_aapKeyBindings[Mod][e.m_Key]);
|
Console()->ExecuteLineStroked(1, m_aapKeyBindings[Mod][e.m_Key]);
|
||||||
if(e.m_Flags & IInput::FLAG_RELEASE)
|
if(e.m_Flags & IInput::FLAG_RELEASE)
|
||||||
Console()->ExecuteLineStroked(0, m_aapKeyBindings[Mod][e.m_Key]);
|
Console()->ExecuteLineStroked(0, m_aapKeyBindings[Mod][e.m_Key]);
|
||||||
ret = true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_aapKeyBindings[0][e.m_Key] && (!ret || m_aapKeyBindings[0][e.m_Key][0] == '+')) // always trigger +xxx binds despite any modifier
|
return false;
|
||||||
{
|
|
||||||
if(e.m_Flags & IInput::FLAG_PRESS)
|
|
||||||
Console()->ExecuteLineStroked(1, m_aapKeyBindings[0][e.m_Key]);
|
|
||||||
if(e.m_Flags & IInput::FLAG_RELEASE)
|
|
||||||
Console()->ExecuteLineStroked(0, m_aapKeyBindings[0][e.m_Key]);
|
|
||||||
ret = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBinds::UnbindAll()
|
void CBinds::UnbindAll()
|
||||||
|
|
Loading…
Reference in a new issue