MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / GetEntities

Method GetEntities

CrySystem/ScriptObjectSystem.cpp:700–718  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// !return a all entities currently present in the level @return a table filled with all entities currently present in the level */

Source from the content-addressed store, hash-verified

698 @return a table filled with all entities currently present in the level
699*/
700int CScriptObjectSystem::GetEntities(IFunctionHandler *pH)
701{
702 CHECK_PARAMETERS(0);
703 _SmartScriptObject pObj(m_pScriptSystem);
704 int k = 0;
705
706 IEntityItPtr pIIt = m_pEntitySystem->GetEntityIterator();
707 IEntity *pEntity = NULL;
708
709 while(pEntity = pIIt->Next())
710 {
711 if (pEntity->GetScriptObject())
712 {
713 pObj->SetAt(k, pEntity->GetScriptObject());
714 k++;
715 }
716 }
717 return pH->EndFunction(*pObj);
718}
719
720/////////////////////////////////////////////////////////////////////////////////
721/////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 5

GetEntityIteratorMethod · 0.80
SetAtMethod · 0.80
EndFunctionMethod · 0.80
NextMethod · 0.45
GetScriptObjectMethod · 0.45

Tested by

no test coverage detected