MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / destructEntity

Method destructEntity

source/game/StarWorldGeneration.cpp:686–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684}
685
686void WorldGenerator::destructEntity(WorldStorage*, EntityPtr const& entity) {
687 if (entity->isSlave())
688 throw StarException("Cannot destruct slave entity in WorldStorage, something has gone wrong!");
689 if (auto tileEntity = as<TileEntity>(entity))
690 m_worldServer->updateTileEntityTiles(tileEntity, true, false);
691 entity->uninit();
692}
693
694bool WorldGenerator::entityKeepAlive(WorldStorage*, EntityPtr const& entity) const {
695 return entity->isSlave() || (entity->isMaster() && entity->keepAlive());

Callers 2

tickMethod · 0.80
unloadSectorToLevelMethod · 0.80

Calls 4

StarExceptionClass · 0.85
isSlaveMethod · 0.80
updateTileEntityTilesMethod · 0.80
uninitMethod · 0.45

Tested by

no test coverage detected