Fixed amb1927 - client command case sensitivity did not match the server's logic.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402483
This commit is contained in:
David Anderson
2008-09-02 03:58:34 +00:00
parent 58870a30fb
commit 4951dccded
2 changed files with 34 additions and 1 deletions
+26 -1
View File
@@ -296,7 +296,32 @@ void ConCmdManager::InternalDispatch(const CCommand &command)
ConCmdInfo *pInfo;
if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
{
return;
/* Unfortunately, we now have to do a slow lookup because Valve made client commands
* case-insensitive. We can't even use our sortedness.
*/
if (client == 0 && !engine->IsDedicatedServer())
{
return;
}
List<ConCmdInfo *>::iterator iter;
pInfo = NULL;
iter = m_CmdList.begin();
while (iter != m_CmdList.end())
{
if (strcasecmp((*iter)->pCmd->GetName(), cmd) == 0)
{
pInfo = (*iter);
break;
}
iter++;
}
if (pInfo == NULL)
{
return;
}
}
/* This is a hack to prevent say triggers from firing on messages that were