Initialize an Entity by ID.
| 7515 | |
| 7516 | // Initialize an Entity by ID. |
| 7517 | bool CQuake3GameInterface::InitEntity( gentity_t *pEntity ) |
| 7518 | { |
| 7519 | //Make sure this is a fresh entity. |
| 7520 | assert( pEntity->m_iIcarusID == IIcarusInterface::ICARUS_INVALID ); |
| 7521 | |
| 7522 | if ( pEntity->m_iIcarusID != IIcarusInterface::ICARUS_INVALID ) |
| 7523 | return false; |
| 7524 | |
| 7525 | // Get an Icarus ID. |
| 7526 | pEntity->m_iIcarusID = IIcarusInterface::GetIcarus()->GetIcarusID( pEntity->s.number ); |
| 7527 | |
| 7528 | // Initialize all taskIDs to -1 |
| 7529 | memset( &pEntity->taskID, -1, sizeof( pEntity->taskID ) ); |
| 7530 | |
| 7531 | // Add this entity to a map of valid associated entity's for quick retrieval later. |
| 7532 | AssociateEntity( pEntity ); |
| 7533 | |
| 7534 | //Precache all the entity's scripts. |
| 7535 | PrecacheEntity( pEntity ); |
| 7536 | |
| 7537 | return false; |
| 7538 | } |
| 7539 | |
| 7540 | // Free an Entity by ID. |
| 7541 | void CQuake3GameInterface::FreeEntity( gentity_t *pEntity ) |
no test coverage detected