MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / initReport

Method initReport

plugins/webstats/webstats.cpp:802–819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800}
801
802void 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
821void WebStats::finishReport(void) {
822 teamSortItr = teamSort.begin();

Callers

nothing calls this directly

Calls 6

bz_getPlayerIndexListFunction · 0.85
sizeMethod · 0.45
getMethod · 0.45
findMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected