| 1042 | COMMAND(kickallbots, ""); |
| 1043 | |
| 1044 | void togglebotview(char *bot) |
| 1045 | { |
| 1046 | if(!botmode()) return; |
| 1047 | /** |
| 1048 | Disable in arena modes, this command causes the game to go in an "infinite loop" |
| 1049 | due to player1 automatically suiciding thus causing a new round to begin. |
| 1050 | */ |
| 1051 | if(m_arena) { conoutf("togglebotview is not allowed in %s", modestr(gamemode, modeacronyms > 0)); return; } |
| 1052 | if (BotManager.m_pBotToView) |
| 1053 | BotManager.DisableBotView(); |
| 1054 | else if (bot && *bot) |
| 1055 | { |
| 1056 | loopv(bots) |
| 1057 | { |
| 1058 | if (!bots[i]) continue; |
| 1059 | |
| 1060 | if (!strcmp(bots[i]->name, bot)) |
| 1061 | { |
| 1062 | BotManager.EnableBotView(bots[i]); |
| 1063 | break; |
| 1064 | } |
| 1065 | } |
| 1066 | } |
| 1067 | } |
| 1068 | |
| 1069 | COMMAND(togglebotview, "s"); |
| 1070 |
nothing calls this directly
no test coverage detected