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

Function playAlert

plugins/keepaway/keepaway.cpp:739–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737}
738
739void playAlert() {
740 bz_APIIntList* playerList = bz_newIntList();
741 bz_getPlayerIndexList(playerList);
742
743 for (unsigned int i = 0; i < playerList->size(); i++) {
744 bz_BasePlayerRecord* player = bz_getPlayerByIndex(playerList->operator[](i));
745
746 if (player) {
747 bz_sendPlayCustomLocalSound(player->playerID, "hunt_select");
748 }
749
750 bz_freePlayerRecord(player);
751 }
752 bz_deleteIntList(playerList);
753
754 return;
755}
756
757inline bool timeForReminder() {
758 double timeLeft = bz_getCurrentTime() - keepaway.lastReminder;

Callers 1

processMethod · 0.85

Calls 6

bz_getPlayerIndexListFunction · 0.85
bz_freePlayerRecordFunction · 0.85
bz_deleteIntListFunction · 0.85
sizeMethod · 0.45
operator[]Method · 0.45

Tested by

no test coverage detected