| 2578 | } |
| 2579 | |
| 2580 | int 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 |
nothing calls this directly
no test coverage detected