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

Function bz_resetFlags

src/bzfs/bzfsAPI.cpp:2902–2915  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2900//-------------------------------------------------------------------------
2901
2902BZF_API void bz_resetFlags(bool onlyUnused) {
2903 for (int i = 0; i < numFlags; i++) {
2904 FlagInfo& flag = *FlagInfo::get(i);
2905 // see if someone had grabbed flag,
2906 const int playerIndex = flag.player;
2907 if (!onlyUnused || (playerIndex == -1)) {
2908 if (playerIndex != -1) {
2909 dropFlag(flag);
2910 }
2911
2912 resetFlag(flag);
2913 }
2914 }
2915}
2916
2917//-------------------------------------------------------------------------
2918

Callers 6

startMethod · 0.85
operator()Method · 0.85
ResetFlagsFunction · 0.85
htfCaptureFunction · 0.85
killTeamsFunction · 0.85
killPlayersFunction · 0.85

Calls 2

dropFlagFunction · 0.85
resetFlagFunction · 0.85

Tested by

no test coverage detected