Merge pull request #7561 from Robyt3/Console-Minor-Fixes

Also print command in console when identical to previous
This commit is contained in:
Dennis Felsing 2023-11-30 11:10:37 +00:00 committed by GitHub
commit 1cf80edb2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View file

@ -34,8 +34,6 @@ public:
TEMPCMD_HELP_LENGTH = 192,
TEMPCMD_PARAMS_LENGTH = 96,
MAX_PRINT_CB = 4,
CLIENT_ID_GAME = -2,
CLIENT_ID_NO_GAME = -3,
};

View file

@ -254,11 +254,11 @@ bool CGameConsole::CInstance::OnInput(const IInput::CEvent &Event)
{
char *pEntry = m_History.Allocate(m_Input.GetLength() + 1);
str_copy(pEntry, m_Input.GetString(), m_Input.GetLength() + 1);
// print out the user's commands before they get run
char aBuf[256];
str_format(aBuf, sizeof(aBuf), "> %s", m_Input.GetString());
m_pGameConsole->PrintLine(m_Type, aBuf);
}
// print out the user's commands before they get run
char aBuf[256];
str_format(aBuf, sizeof(aBuf), "> %s", m_Input.GetString());
m_pGameConsole->PrintLine(m_Type, aBuf);
}
ExecuteLine(m_Input.GetString());
m_Input.Clear();