mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
removed some not longer needed stuff
This commit is contained in:
parent
7503c64237
commit
f494d344a9
|
@ -29,13 +29,6 @@ float CConsole::CResult::GetFloat(unsigned Index)
|
|||
}
|
||||
|
||||
// the maximum number of tokens occurs in a string of length CONSOLE_MAX_STR_LENGTH with tokens size 1 separated by single spaces
|
||||
static char *SkipBlanks(char *pStr)
|
||||
{
|
||||
while(*pStr && (*pStr == ' ' || *pStr == '\t' || *pStr == '\n'))
|
||||
pStr++;
|
||||
return pStr;
|
||||
}
|
||||
|
||||
static char *SkipToBlank(char *pStr)
|
||||
{
|
||||
while(*pStr && (*pStr != ' ' && *pStr != '\t' && *pStr != '\n'))
|
||||
|
@ -55,7 +48,7 @@ int CConsole::ParseStart(CResult *pResult, const char *pString, int Length)
|
|||
pStr = pResult->m_aStringStorage;
|
||||
|
||||
// get command
|
||||
pStr = SkipBlanks(pStr);
|
||||
pStr = str_skip_whitespaces(pStr);
|
||||
pResult->m_pCommand = pStr;
|
||||
pStr = SkipToBlank(pStr);
|
||||
|
||||
|
@ -91,7 +84,7 @@ int CConsole::ParseArgs(CResult *pResult, const char *pFormat)
|
|||
Optional = 1;
|
||||
else
|
||||
{
|
||||
pStr = SkipBlanks(pStr);
|
||||
pStr = str_skip_whitespaces(pStr);
|
||||
|
||||
if(!(*pStr)) // error, non optional command needs value
|
||||
{
|
||||
|
|
|
@ -746,15 +746,6 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId)
|
|||
p->m_TeeInfos.m_ColorBody = pMsg->m_ColorBody;
|
||||
p->m_TeeInfos.m_ColorFeet = pMsg->m_ColorFeet;
|
||||
|
||||
// check for invalid chars
|
||||
unsigned char *pName = (unsigned char *)pMsg->m_pName;
|
||||
while (*pName)
|
||||
{
|
||||
if(*pName < 32)
|
||||
*pName = ' ';
|
||||
pName++;
|
||||
}
|
||||
|
||||
// copy old name
|
||||
char aOldName[MAX_NAME_LENGTH];
|
||||
str_copy(aOldName, Server()->ClientName(ClientId), MAX_NAME_LENGTH);
|
||||
|
|
Loading…
Reference in a new issue