Skip to content

Commit

Permalink
Merge pull request ddnet#7561 from Robyt3/Console-Minor-Fixes
Browse files Browse the repository at this point in the history
Also print command in console when identical to previous
  • Loading branch information
def- authored Nov 30, 2023
2 parents 8ae5f89 + a1eb0dd commit 1cf80ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/engine/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ class IConsole : public IInterface
TEMPCMD_HELP_LENGTH = 192,
TEMPCMD_PARAMS_LENGTH = 96,

MAX_PRINT_CB = 4,

CLIENT_ID_GAME = -2,
CLIENT_ID_NO_GAME = -3,
};
Expand Down
8 changes: 4 additions & 4 deletions src/game/client/components/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1cf80ed

Please sign in to comment.