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

Method computeVisualDebugEntities

source/entities/Creature.cpp:1721–1751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1719}
1720
1721void Creature::computeVisualDebugEntities()
1722{
1723 if(!getIsOnServerMap())
1724 return;
1725
1726 mHasVisualDebuggingEntities = true;
1727
1728 updateTilesInSight();
1729
1730 ServerNotification *serverNotification = new ServerNotification(
1731 ServerNotificationType::refreshCreatureVisDebug, nullptr);
1732
1733 const std::string& name = getName();
1734 serverNotification->mPacket << name;
1735 serverNotification->mPacket << true;
1736 if(getIsOnMap())
1737 {
1738 uint32_t nbTiles = mVisibleTiles.size();
1739 serverNotification->mPacket << nbTiles;
1740
1741 for (Tile* tile : mVisibleTiles)
1742 getGameMap()->tileToPacket(serverNotification->mPacket, tile);
1743 }
1744 else
1745 {
1746 uint32_t nbTiles = 0;
1747 serverNotification->mPacket << nbTiles;
1748 }
1749
1750 ODServer::getSingleton().queueServerNotification(serverNotification);
1751}
1752
1753void Creature::refreshVisualDebugEntities(const std::vector<Tile*>& tiles)
1754{

Callers 1

Calls 2

tileToPacketMethod · 0.80

Tested by

no test coverage detected