| 800 | } |
| 801 | |
| 802 | void WebStats::initReport(void) { |
| 803 | bz_APIIntList* players = bz_getPlayerIndexList(); |
| 804 | |
| 805 | for (int i = 0; i < (int)players->size(); i++) { |
| 806 | int playerID = players->get(i); |
| 807 | bz_BasePlayerRecord* rec = bz_getPlayerByIndex(playerID); |
| 808 | |
| 809 | if (rec) { |
| 810 | if (teamSort.find(rec->team) == teamSort.end()) { |
| 811 | std::vector<bz_BasePlayerRecord*> temp; |
| 812 | teamSort[rec->team] = temp; |
| 813 | } |
| 814 | teamSort[rec->team].push_back(rec); |
| 815 | } |
| 816 | } |
| 817 | teamSortItr = teamSort.end(); |
| 818 | playerInTeam = 0; |
| 819 | } |
| 820 | |
| 821 | void WebStats::finishReport(void) { |
| 822 | teamSortItr = teamSort.begin(); |