gets a 3-element vector value for an entity key
*/
-void GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec ){
+qboolean GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec ){
const char *k;
double v1, v2, v3;
vec[ 0 ] = v1;
vec[ 1 ] = v2;
vec[ 2 ] = v3;
+
+ /* true if the key is found, false otherwise */
+ return strlen( k );
}
int FloodEntities( tree_t *tree ){
int i, s;
vec3_t origin, offset, scale, angles;
- qboolean r, inside, skybox;
+ qboolean r, inside, skybox, found;
node_t *headnode;
entity_t *e, *tripped;
const char *value;
e = &entities[ i ];
/* get origin */
- GetVectorForKey( e, "origin", origin );
+ found = GetVectorForKey( e, "origin", origin );
/* as a special case, allow origin-less entities */
- if ( VectorCompare( origin, vec3_origin ) ) {
+ if ( !found ) {
continue;
}
const char *ValueForKey( const entity_t *ent, const char *key );
int IntForKey( const entity_t *ent, const char *key );
vec_t FloatForKey( const entity_t *ent, const char *key );
-void GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec );
+qboolean GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec );
entity_t *FindTargetEntity( const char *target );
void GetEntityShadowFlags( const entity_t *ent, const entity_t *ent2, int *castShadows, int *recvShadows );
void InjectCommandLine( char **argv, int beginArgs, int endArgs );