Fix setting random skin of RVSF bots

Also improve assignment bots to teams.
This commit is contained in:
aurhat
2016-09-17 18:25:33 +02:00
parent 925645ecb3
commit 9e521dfd4a
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -881,7 +881,6 @@ botent *CBotManager::CreateBot(const char *team, const char *skill, const char *
if (!m) return NULL;
loopi(NUMGUNS) m->ammo[i] = m->mag[i] = 0;
m->lifesequence = 0;
setskin(m, rnd(6));
m->pBot = new CACBot;
m->type = ENT_BOT;
m->pBot->m_pMyEnt = m;
@@ -894,7 +893,8 @@ botent *CBotManager::CreateBot(const char *team, const char *skill, const char *
updateclientname((playerent *)m);
const char *tempteam = team && *team && strcmp(team, "random") ? team : BotManager.GetBotTeam();
loopi(TEAM_NUM) if(!strcmp(teamnames[i], tempteam)) { m->team = i; break; }
m->team = team_base(teamatoi(tempteam));
setskin(m, m->team == TEAM_CLA ? rnd(4) : rnd(6), m->team);
if (skill && *skill && strcmp(skill, "random"))
{