Determines whether or not a Game Element needs ICARUS information.
| 7570 | |
| 7571 | // Determines whether or not a Game Element needs ICARUS information. |
| 7572 | bool CQuake3GameInterface::ValidEntity( gentity_t *pEntity ) |
| 7573 | { |
| 7574 | int i; |
| 7575 | |
| 7576 | // Targeted by a script. |
| 7577 | if ( pEntity->script_targetname && pEntity->script_targetname[0] ) |
| 7578 | return true; |
| 7579 | |
| 7580 | // Potentially able to call a script. |
| 7581 | for ( i = 0; i < NUM_BSETS; i++ ) |
| 7582 | { |
| 7583 | if VALIDSTRING( pEntity->behaviorSet[i] ) |
| 7584 | { |
| 7585 | //Com_Printf( "WARNING: Entity %d (%s) has behaviorSet but no script_targetname -- using targetname\n", pEntity->s.number, pEntity->targetname ); |
| 7586 | pEntity->script_targetname = G_NewString(pEntity->targetname); |
| 7587 | return true; |
| 7588 | } |
| 7589 | } |
| 7590 | |
| 7591 | return false; |
| 7592 | } |
| 7593 | |
| 7594 | // Associate the entity's id and name so that it can be referenced later. |
| 7595 | void CQuake3GameInterface::AssociateEntity( gentity_t *pEntity ) |
no test coverage detected