MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / clearCreatures

Method clearCreatures

source/gamemap/GameMap.cpp:328–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328void GameMap::clearCreatures()
329{
330 // We need to work on a copy of mCreatures because removeFromGameMap will remove them from this vector
331 std::vector<Creature*> creatures = mCreatures;
332 for (Creature* creature : creatures)
333 {
334 creature->removeFromGameMap();
335 creature->deleteYourself();
336 }
337
338 mCreatures.clear();
339}
340
341void GameMap::clearAiManager()
342{

Callers

nothing calls this directly

Calls 3

deleteYourselfMethod · 0.80
clearMethod · 0.80
removeFromGameMapMethod · 0.45

Tested by

no test coverage detected