string function cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4714 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -164,7 +164,7 @@ void CBotManager::LoadBotNamesFile()
|
||||
{ conoutf("Warning: bot name \"%s\" has to many characters(16 is max)",
|
||||
szNameBuffer);
|
||||
}
|
||||
s_strncpy(m_szBotNames[m_sBotNameCount], szNameBuffer, 16);
|
||||
copystring(m_szBotNames[m_sBotNameCount], szNameBuffer, 16);
|
||||
m_sBotNameCount++;
|
||||
}
|
||||
}
|
||||
@@ -256,7 +256,7 @@ void CBotManager::LoadBotTeamsFile()
|
||||
|
||||
if (szNameBuffer[0] != 0)
|
||||
{
|
||||
s_strncpy(m_szBotTeams[m_sBotTeamCount], szNameBuffer, 5);
|
||||
copystring(m_szBotTeams[m_sBotTeamCount], szNameBuffer, 5);
|
||||
m_sBotTeamCount++;
|
||||
}
|
||||
}
|
||||
@@ -919,9 +919,9 @@ botent *CBotManager::CreateBot(const char *team, const char *skill, const char *
|
||||
m->pBot->m_bSendC2SInit = false;
|
||||
|
||||
if (name && *name)
|
||||
s_strncpy(m->name, name, 16);
|
||||
copystring(m->name, name, 16);
|
||||
else
|
||||
s_strncpy(m->name, BotManager.GetBotName(), 16);
|
||||
copystring(m->name, BotManager.GetBotName(), 16);
|
||||
|
||||
const char *tempteam = team && *team && strcmp(team, "random") ? team : BotManager.GetBotTeam();
|
||||
m->team = TEAM_SPECT;
|
||||
|
||||
Reference in New Issue
Block a user