mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
removed some unneeded stuff
This commit is contained in:
parent
4f402f85bb
commit
37bdc4c2a1
|
@ -210,23 +210,15 @@ bool CChat::OnInput(IInput::CEvent Event)
|
|||
m_pHistoryEntry = m_History.Last();
|
||||
|
||||
if (m_pHistoryEntry)
|
||||
{
|
||||
unsigned int Len = str_length(m_pHistoryEntry);
|
||||
if (Len < sizeof(m_Input) - 1) // TODO: WTF?
|
||||
m_Input.Set(m_pHistoryEntry);
|
||||
}
|
||||
}
|
||||
else if (Event.m_Flags&IInput::FLAG_PRESS && Event.m_Key == KEY_DOWN)
|
||||
{
|
||||
if (m_pHistoryEntry)
|
||||
m_pHistoryEntry = m_History.Next(m_pHistoryEntry);
|
||||
|
||||
if (m_pHistoryEntry)
|
||||
{
|
||||
unsigned int Len = str_length(m_pHistoryEntry);
|
||||
if (Len < sizeof(m_Input) - 1) // TODO: WTF?
|
||||
m_Input.Set(m_pHistoryEntry);
|
||||
}
|
||||
else
|
||||
m_Input.Clear();
|
||||
}
|
||||
|
|
|
@ -127,11 +127,7 @@ void CGameConsole::CInstance::OnInput(IInput::CEvent Event)
|
|||
m_pHistoryEntry = m_History.Last();
|
||||
|
||||
if (m_pHistoryEntry)
|
||||
{
|
||||
unsigned int Len = str_length(m_pHistoryEntry);
|
||||
if (Len < sizeof(m_Input) - 1) // TODO: WTF?
|
||||
m_Input.Set(m_pHistoryEntry);
|
||||
}
|
||||
Handled = true;
|
||||
}
|
||||
else if (Event.m_Key == KEY_DOWN)
|
||||
|
@ -140,11 +136,7 @@ void CGameConsole::CInstance::OnInput(IInput::CEvent Event)
|
|||
m_pHistoryEntry = m_History.Next(m_pHistoryEntry);
|
||||
|
||||
if (m_pHistoryEntry)
|
||||
{
|
||||
unsigned int Len = str_length(m_pHistoryEntry);
|
||||
if (Len < sizeof(m_Input) - 1) // TODO: WTF?
|
||||
m_Input.Set(m_pHistoryEntry);
|
||||
}
|
||||
else
|
||||
m_Input.Clear();
|
||||
Handled = true;
|
||||
|
|
Loading…
Reference in a new issue