| 147 | } |
| 148 | |
| 149 | const char *CBotManager::GetBotName() |
| 150 | { |
| 151 | const char *szOutput = NULL; |
| 152 | TMultiChoice<const char *> BotNameChoices; |
| 153 | short ChoiceVal; |
| 154 | |
| 155 | for(int j=0;j<m_sBotNameCount;j++) |
| 156 | { |
| 157 | ChoiceVal = 50; |
| 158 | |
| 159 | loopv(bots) |
| 160 | { |
| 161 | if (bots[i] && (!strcasecmp(bots[i]->name, m_szBotNames[j]))) |
| 162 | { |
| 163 | ChoiceVal = 0; |
| 164 | break; |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | if (!strcasecmp(player1->name, m_szBotNames[j])) |
| 169 | ChoiceVal = 0; |
| 170 | |
| 171 | if(ChoiceVal) BotNameChoices.Insert(m_szBotNames[j], ChoiceVal); |
| 172 | } |
| 173 | |
| 174 | // Couldn't find a selection? |
| 175 | if (!BotNameChoices.GetSelection(szOutput)) |
| 176 | szOutput = "Bot"; |
| 177 | |
| 178 | return szOutput; |
| 179 | } |
| 180 | |
| 181 | void CBotManager::LoadBotTeamsFile() |
| 182 | { |
no test coverage detected