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

Method DumpEntities

CryGame/ScriptObjectGame.cpp:2580–2598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2578}
2579
2580int CScriptObjectGame::DumpEntities(IFunctionHandler *pH)
2581{
2582 CHECK_PARAMETERS(0);
2583 m_pSystem->GetILog()->Log("------------------------------------------------------------------------------------------");
2584 IEntityClassRegistry *pECR=m_pGame->GetClassRegistry();
2585 IEntityItPtr pEntities=m_pSystem->GetIEntitySystem()->GetEntityIterator();
2586 pEntities->MoveFirst();
2587 IEntity *pEnt=NULL;
2588 while((pEnt=pEntities->Next())!=NULL)
2589 {
2590 EntityClass *pClass=pECR->GetByClass(pEnt->GetEntityClassName());
2591 //if(m_pGame->GetWeaponSystem()->IsWeaponClass(pClass->cTypeID)) continue;
2592 if(m_pGame->GetWeaponSystemEx()->IsProjectileClass(pClass->ClassId)) continue;
2593 Vec3 pos = pEnt->GetPos();
2594 m_pSystem->GetILog()->Log("ENTITY class=%s/%d ent=%s/%d pos=(%.1f,%.1f,%.1f)", pClass->strClassName.c_str(), (int)pClass->ClassId, pEnt->GetName(), pEnt->GetId(), pos.x, pos.y, pos.z);
2595 }
2596 m_pSystem->GetILog()->Log("------------------------------------------------------------------------------------------");
2597 return pH->EndFunction();
2598}
2599
2600// FIXME: tim, refactor these functions
2601

Callers

nothing calls this directly

Calls 15

GetILogMethod · 0.80
GetClassRegistryMethod · 0.80
GetEntityIteratorMethod · 0.80
GetIEntitySystemMethod · 0.80
GetByClassMethod · 0.80
IsProjectileClassMethod · 0.80
GetWeaponSystemExMethod · 0.80
EndFunctionMethod · 0.80
LogMethod · 0.45
MoveFirstMethod · 0.45
NextMethod · 0.45
GetEntityClassNameMethod · 0.45

Tested by

no test coverage detected