removed some unneeded stuff

This commit is contained in:
oy 2011-06-09 23:40:35 +02:00
parent 4f402f85bb
commit 37bdc4c2a1
2 changed files with 4 additions and 20 deletions

View file

@ -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();
}

View file

@ -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;