| 521 | } |
| 522 | |
| 523 | bool teamClear(bz_eTeamType teamToCheck) { |
| 524 | if (teamToCheck == eRogueTeam || teamToCheck == eNoTeam || !koth.teamPlay) { |
| 525 | return true; |
| 526 | } |
| 527 | |
| 528 | bz_APIIntList* playerList = bz_newIntList(); |
| 529 | bz_getPlayerIndexList(playerList); |
| 530 | |
| 531 | bool isOut = true; |
| 532 | |
| 533 | for (unsigned int i = 0; i < playerList->size(); i++) { |
| 534 | |
| 535 | bz_BasePlayerRecord* player = bz_getPlayerByIndex(playerList->operator[](i)); |
| 536 | |
| 537 | if (player) { |
| 538 | if (player->team == teamToCheck && kothzone.pointIn(player->currentState.pos) && player->spawned) { |
| 539 | isOut = false; |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | bz_freePlayerRecord(player); |
| 544 | } |
| 545 | |
| 546 | bz_deleteIntList(playerList); |
| 547 | |
| 548 | return isOut; |
| 549 | } |
| 550 | |
| 551 | void KOTHPlayerPaused::process(bz_EventData* eventData) { |
| 552 | if (eventData->eventType != bz_ePlayerPausedEvent || !koth.enabled) { |
no test coverage detected