MCPcopy Create free account
hub / github.com/JACoders/OpenJK / ValidEntity

Method ValidEntity

code/game/Q3_Interface.cpp:7572–7592  ·  view source on GitHub ↗

Determines whether or not a Game Element needs ICARUS information.

Source from the content-addressed store, hash-verified

7570
7571// Determines whether or not a Game Element needs ICARUS information.
7572bool 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.
7595void CQuake3GameInterface::AssociateEntity( gentity_t *pEntity )

Callers 4

scriptrunner_runFunction · 0.80

Calls 2

VALIDSTRINGFunction · 0.85
G_NewStringFunction · 0.70

Tested by

no test coverage detected