MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / FindEntityByName

Method FindEntityByName

Code/CryEngine/CryEntitySystem/EntitySystem.cpp:1073–1094  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1071
1072//////////////////////////////////////////////////////////////////////////
1073IEntity* CEntitySystem::FindEntityByName(const char* sEntityName) const
1074{
1075 if (!sEntityName || !sEntityName[0])
1076 return 0; // no entity name specified
1077
1078 if (CVar::es_DebugFindEntity != 0)
1079 {
1080 CryLog("FindEntityByName: %s", sEntityName);
1081 if (CVar::es_DebugFindEntity == 2)
1082 GetISystem()->debug_LogCallStack();
1083 }
1084
1085 // Find first object with this name.
1086 EntityNamesMap::const_iterator it = m_mapEntityNames.lower_bound(sEntityName);
1087 if (it != m_mapEntityNames.end())
1088 {
1089 if (stricmp(it->first, sEntityName) == 0)
1090 return GetEntity(it->second);
1091 }
1092
1093 return 0; // name not found
1094}
1095
1096//////////////////////////////////////////////////////////////////////
1097uint32 CEntitySystem::GetNumEntities() const

Callers 15

DrawProfileEntryMethod · 0.80
CommTestMethod · 0.80
CommTestStopMethod · 0.80
DebugAgentMethod · 0.80
UpdateProxyMethod · 0.80
DebugDrawP0AndP1Method · 0.80
DebugDrawCheckRayMethod · 0.80

Calls 6

CryLogFunction · 0.85
GetISystemFunction · 0.85
GetEntityFunction · 0.85
debug_LogCallStackMethod · 0.80
lower_boundMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected