/////////////////////////////////////////////////////////////////
| 541 | |
| 542 | ////////////////////////////////////////////////////////////////////// |
| 543 | IEntity* CEntitySystem::GetEntity( EntityId id ) |
| 544 | { |
| 545 | m_nGetEntityCounter++; |
| 546 | EntityMap::iterator it = m_mapEntities.find(id); |
| 547 | if (it != m_mapEntities.end()) |
| 548 | { |
| 549 | // Entity found. |
| 550 | return (IEntity*)(it->second); |
| 551 | } |
| 552 | |
| 553 | /* |
| 554 | it = m_vStaticEntities.find(id); |
| 555 | if (it != m_vStaticEntities.end()) |
| 556 | { |
| 557 | return (IEntity*) (it->second); |
| 558 | } |
| 559 | */ |
| 560 | |
| 561 | // ASSERT(id==0); // if we have a valid id here, someone is using the id after deleting the ent |
| 562 | return NULL; |
| 563 | } |
| 564 | |
| 565 | ////////////////////////////////////////////////////////////////////// |
| 566 | EntityId CEntitySystem::FindEntity( const char *name ) const |
no test coverage detected