close the motd if we actively wanna look on the scoreboard. closes #1920

This commit is contained in:
oy 2018-12-24 10:54:02 +01:00
parent 8f2f42ee3a
commit 0cc8e8530d
2 changed files with 5 additions and 1 deletions

View file

@ -9,8 +9,8 @@ class CMotd : public CComponent
// motd
int64 m_ServerMotdTime;
char m_aServerMotd[1024];
void Clear();
public:
void Clear();
bool IsActive();
const char *GetMotd() const { return m_aServerMotd; }

View file

@ -637,6 +637,10 @@ void CScoreboard::OnRender()
else if(m_SkipPlayerStatsReset && m_pClient->m_Snap.m_pGameData && m_pClient->m_Snap.m_pGameData->m_GameStartTick != Client()->GameTick())
m_SkipPlayerStatsReset = false;
// close the motd if we actively wanna look on the scoreboard
if(m_Active)
m_pClient->m_pMotd->Clear();
if(!Active())
return;