| 300 | } |
| 301 | |
| 302 | bool onePlayer() { |
| 303 | int numPlayers = |
| 304 | bz_getTeamCount(eRedTeam) + bz_getTeamCount(eGreenTeam) + bz_getTeamCount(eBlueTeam) + bz_getTeamCount(ePurpleTeam) + |
| 305 | bz_getTeamCount(eRogueTeam); |
| 306 | |
| 307 | if (numPlayers <= 1) { |
| 308 | if (!koth.onePlayerWarn) { |
| 309 | bz_sendTextMessage(BZ_SERVER, BZ_ALLUSERS, "King of the Hill disabled: less than 2 players."); |
| 310 | } |
| 311 | |
| 312 | koth.onePlayerWarn = true; |
| 313 | return true; |
| 314 | } |
| 315 | else { |
| 316 | if (koth.onePlayerWarn) { |
| 317 | bz_sendTextMessage(BZ_SERVER, BZ_ALLUSERS, "King of the Hill enabled: more than 1 player."); |
| 318 | } |
| 319 | |
| 320 | koth.onePlayerWarn = false; |
| 321 | return false; |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | void autoTime() { |
| 326 | int numPlayers = |
no test coverage detected