Prepare DDNet gametype name

This commit is contained in:
def 2014-09-20 13:48:59 +02:00
parent 684ad0b890
commit d6aea5ba40
2 changed files with 4 additions and 3 deletions

View file

@ -427,7 +427,7 @@ void CClient::Rcon(const char *pCmd)
{
CServerInfo Info;
GetServerInfo(&Info);
if(RconAuthed() && str_find_nocase(Info.m_aGameType, "ddracenetw"))
if(RconAuthed() && (str_find_nocase(Info.m_aGameType, "ddracenetw") || str_find_nocase(Info.m_aGameType, "ddnet")))
{ // Against IP spoofing on DDNet servers
CMsgPacker Msg(NETMSG_RCON_AUTH);
Msg.AddString("", 32);
@ -1432,7 +1432,7 @@ void CClient::ProcessConnlessPacket(CNetChunk *pPacket)
if(State() == IClient::STATE_ONLINE && !m_TimeoutCodeSent[g_Config.m_ClDummy])
{
if(str_find_nocase(Info.m_aGameType, "ddracenetw"))
if(str_find_nocase(Info.m_aGameType, "ddracenetw") || str_find_nocase(Info.m_aGameType, "ddnet"))
{
m_TimeoutCodeSent[g_Config.m_ClDummy] = true;
CNetMsg_Cl_Say Msg;

View file

@ -487,7 +487,8 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
hsl = vec3(0.00f, 1.0f, 0.75f); // Instagib
else if (str_find_nocase(pItem->m_aGameType, "fng"))
hsl = vec3(0.83f, 1.0f, 0.75f); // FNG
else if (str_find_nocase(pItem->m_aGameType, "ddracenetwo"))
else if (str_find_nocase(pItem->m_aGameType, "ddracenetw")
|| str_find_nocase(pItem->m_aGameType, "ddnet"))
hsl = vec3(0.58f, 1.0f, 0.75f); // DDNet
else if (str_find_nocase(pItem->m_aGameType, "ddrace")
|| str_find_nocase(pItem->m_aGameType, "mkrace"))