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

Method removeFromGameMap

source/entities/Creature.cpp:343–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343void Creature::removeFromGameMap()
344{
345 fireEntityRemoveFromGameMap();
346 removeEntityFromPositionTile();
347 getGameMap()->removeCreature(this);
348 getGameMap()->removeAnimatedObject(this);
349 getGameMap()->removeClientUpkeepEntity(this);
350
351 if(!getIsOnServerMap())
352 return;
353
354 // If the creature has a homeTile where it sleeps, its bed needs to be destroyed.
355 if (getHomeTile() != nullptr)
356 {
357 RoomDormitory* home = static_cast<RoomDormitory*>(getHomeTile()->getCoveringBuilding());
358 home->releaseTileForSleeping(getHomeTile(), this);
359 }
360
361 fireRemoveEntityToSeatsWithVision();
362 getGameMap()->removeActiveObject(this);
363}
364
365std::string Creature::getCreatureStreamFormat()
366{

Callers

nothing calls this directly

Calls 6

removeCreatureMethod · 0.80
removeAnimatedObjectMethod · 0.80
getCoveringBuildingMethod · 0.80
removeActiveObjectMethod · 0.80

Tested by

no test coverage detected