mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #7470 from furo321/remove-map-setting-msg
Don't print "tunes"/unknown commands from maps.
This commit is contained in:
commit
4e27299657
|
@ -3369,6 +3369,11 @@ void CGameClient::RefindSkins()
|
|||
m_KillMessages.RefindSkins();
|
||||
}
|
||||
|
||||
static bool UnknownMapSettingCallback(const char *pCommand, void *pUser)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void CGameClient::LoadMapSettings()
|
||||
{
|
||||
// Reset Tunezones
|
||||
|
@ -3403,13 +3408,14 @@ void CGameClient::LoadMapSettings()
|
|||
int Size = pMap->GetDataSize(pItem->m_Settings);
|
||||
char *pSettings = (char *)pMap->GetData(pItem->m_Settings);
|
||||
char *pNext = pSettings;
|
||||
dbg_msg("tune", "%s", pNext);
|
||||
Console()->SetUnknownCommandCallback(UnknownMapSettingCallback, nullptr);
|
||||
while(pNext < pSettings + Size)
|
||||
{
|
||||
int StrSize = str_length(pNext) + 1;
|
||||
Console()->ExecuteLine(pNext, IConsole::CLIENT_ID_GAME);
|
||||
pNext += StrSize;
|
||||
}
|
||||
Console()->SetUnknownCommandCallback(IConsole::EmptyUnknownCommandCallback, nullptr);
|
||||
pMap->UnloadData(pItem->m_Settings);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue