mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Don't print "tunes"/unknown commands from maps.
This commit is contained in:
parent
db44f218dd
commit
e3402cbf85
|
@ -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