MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / findPlayerStartEntity

Function findPlayerStartEntity

test/Entity.cpp:1718–1733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1716}
1717
1718inline IEntityNodePtr findPlayerStartEntity()
1719{
1720 IEntityNodePtr found;
1721
1722 algorithm::findFirstEntity(GlobalMapModule().getRoot(), [&](const IEntityNodePtr& entity)
1723 {
1724 if (entity->getEntity().getEntityClass()->getDeclName() == "info_player_start")
1725 {
1726 found = entity;
1727 }
1728
1729 return found == nullptr;
1730 });
1731
1732 return found;
1733}
1734
1735TEST_F(EntityTest, AddPlayerStart)
1736{

Callers 1

TEST_FFunction · 0.85

Calls 5

findFirstEntityFunction · 0.85
getDeclNameMethod · 0.80
getRootMethod · 0.45
getEntityClassMethod · 0.45
getEntityMethod · 0.45

Tested by

no test coverage detected