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

Method removeClient

src/clientbase/GfxBlock.cpp:278–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276
277
278void GfxBlockMgr::removeClient(EventClient* ec) {
279 for (int i = 0; i < (int)BlockIDCount; i++) {
280 blocks[i]->remove(ec);
281 }
282
283 // clear the flag blocks
284 const World* world = World::getWorld();
285 if (world != NULL) {
286 for (int i = 0; i < world->getMaxFlags(); i++) {
287 ClientFlag& flag = world->getClientFlag(i);
288 flag.gfxBlock.remove(ec);
289 }
290 }
291
292 // clear the players and their shots
293 iteratePlayers(clearPlayerBlocks, ec, true /*includeWeapons*/);
294}
295
296
297//============================================================================//

Callers

nothing calls this directly

Calls 3

iteratePlayersFunction · 0.85
getMaxFlagsMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected