Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

be_aas_entity.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

int AAS_BestReachableEntityArea (int entnum)
void AAS_EntityInfo (int entnum, aas_entityinfo_t *info)
int AAS_EntityModelindex (int entnum)
int AAS_EntityModelNum (int entnum)
void AAS_EntityOrigin (int entnum, vec3_t origin)
void AAS_EntitySize (int entnum, vec3_t mins, vec3_t maxs)
int AAS_EntityType (int entnum)
int AAS_NextEntity (int entnum)
int AAS_OriginOfMoverWithModelNum (int modelnum, vec3_t origin)


Function Documentation

int AAS_BestReachableEntityArea int  entnum  ) 
 

Definition at line 414 of file be_aas_entity.c.

References AAS_BestReachableLinkArea(), aas_entity_t, aasworld, aas_entity_s::areas, and aas_s::entities.

00415 {
00416     aas_entity_t *ent;
00417 
00418     ent = &aasworld.entities[entnum];
00419     return AAS_BestReachableLinkArea(ent->areas);
00420 } //end of the function AAS_BestReachableEntityArea

Here is the call graph for this function:

void AAS_EntityInfo int  entnum,
aas_entityinfo_t info
 

Definition at line 171 of file be_aas_entity.c.

References aas_entityinfo_t, aasworld, botimport, Com_Memcpy(), Com_Memset(), aas_s::entities, aas_entity_s::i, aas_s::initialized, aas_s::maxentities, and PRT_FATAL.

Referenced by BotFindEntityForLevelItem(), BotItemGoalInVisButNotVisible(), BotUpdateEntityItems(), and GrappleState().

00172 {
00173     if (!aasworld.initialized)
00174     {
00175         botimport.Print(PRT_FATAL, "AAS_EntityInfo: aasworld not initialized\n");
00176         Com_Memset(info, 0, sizeof(aas_entityinfo_t));
00177         return;
00178     } //end if
00179 
00180     if (entnum < 0 || entnum >= aasworld.maxentities)
00181     {
00182         botimport.Print(PRT_FATAL, "AAS_EntityInfo: entnum %d out of range\n", entnum);
00183         Com_Memset(info, 0, sizeof(aas_entityinfo_t));
00184         return;
00185     } //end if
00186 
00187     Com_Memcpy(info, &aasworld.entities[entnum].i, sizeof(aas_entityinfo_t));
00188 } //end of the function AAS_EntityInfo

Here is the call graph for this function:

int AAS_EntityModelindex int  entnum  ) 
 

Definition at line 212 of file be_aas_entity.c.

References aasworld, botimport, aas_s::entities, aas_entity_s::i, aas_s::maxentities, aas_entityinfo_s::modelindex, and PRT_FATAL.

Referenced by BotFindEntityForLevelItem(), BotMoveToGoal(), BotReachabilityArea(), and BotUpdateEntityItems().

00213 {
00214     if (entnum < 0 || entnum >= aasworld.maxentities)
00215     {
00216         botimport.Print(PRT_FATAL, "AAS_EntityModelindex: entnum %d out of range\n", entnum);
00217         return 0;
00218     } //end if
00219     return aasworld.entities[entnum].i.modelindex;
00220 } //end of the function AAS_EntityModelindex

int AAS_EntityModelNum int  entnum  ) 
 

Definition at line 244 of file be_aas_entity.c.

References aasworld, botimport, aas_s::entities, aas_entity_s::i, aas_s::initialized, aas_s::maxentities, aas_entityinfo_s::modelindex, and PRT_FATAL.

Referenced by BotOnMover().

00245 {
00246     if (!aasworld.initialized) return 0;
00247 
00248     if (entnum < 0 || entnum >= aasworld.maxentities)
00249     {
00250         botimport.Print(PRT_FATAL, "AAS_EntityModelNum: entnum %d out of range\n", entnum);
00251         return 0;
00252     } //end if
00253     return aasworld.entities[entnum].i.modelindex;
00254 } //end of the function AAS_EntityModelNum

void AAS_EntityOrigin int  entnum,
vec3_t  origin
 

Definition at line 195 of file be_aas_entity.c.

References aasworld, botimport, aas_s::entities, aas_entity_s::i, aas_s::maxentities, aas_entityinfo_s::origin, PRT_FATAL, VectorClear, and VectorCopy.

00196 {
00197     if (entnum < 0 || entnum >= aasworld.maxentities)
00198     {
00199         botimport.Print(PRT_FATAL, "AAS_EntityOrigin: entnum %d out of range\n", entnum);
00200         VectorClear(origin);
00201         return;
00202     } //end if
00203 
00204     VectorCopy(aasworld.entities[entnum].i.origin, origin);
00205 } //end of the function AAS_EntityOrigin

void AAS_EntitySize int  entnum,
vec3_t  mins,
vec3_t  maxs
 

Definition at line 286 of file be_aas_entity.c.

References aas_entity_t, aasworld, botimport, aas_s::entities, aas_entity_s::i, aas_s::initialized, aas_s::maxentities, aas_entityinfo_s::maxs, aas_entityinfo_s::mins, PRT_FATAL, and VectorCopy.

00287 {
00288     aas_entity_t *ent;
00289 
00290     if (!aasworld.initialized) return;
00291 
00292     if (entnum < 0 || entnum >= aasworld.maxentities)
00293     {
00294         botimport.Print(PRT_FATAL, "AAS_EntitySize: entnum %d out of range\n", entnum);
00295         return;
00296     } //end if
00297 
00298     ent = &aasworld.entities[entnum];
00299     VectorCopy(ent->i.mins, mins);
00300     VectorCopy(ent->i.maxs, maxs);
00301 } //end of the function AAS_EntitySize

int AAS_EntityType int  entnum  ) 
 

Definition at line 227 of file be_aas_entity.c.

References aasworld, botimport, aas_s::entities, aas_entity_s::i, aas_s::initialized, aas_s::maxentities, PRT_FATAL, and aas_entityinfo_s::type.

Referenced by BotUpdateEntityItems(), and GrappleState().

00228 {
00229     if (!aasworld.initialized) return 0;
00230 
00231     if (entnum < 0 || entnum >= aasworld.maxentities)
00232     {
00233         botimport.Print(PRT_FATAL, "AAS_EntityType: entnum %d out of range\n", entnum);
00234         return 0;
00235     } //end if
00236     return aasworld.entities[entnum].i.type;
00237 } //end of the AAS_EntityType

int AAS_NextEntity int  entnum  ) 
 

Definition at line 427 of file be_aas_entity.c.

References aasworld, aas_s::entities, aas_entity_s::i, aas_s::loaded, aas_s::maxentities, and aas_entityinfo_s::valid.

Referenced by BotFindEntityForLevelItem(), BotUpdateEntityItems(), and GrappleState().

00428 {
00429     if (!aasworld.loaded) return 0;
00430 
00431     if (entnum < 0) entnum = -1;
00432     while(++entnum < aasworld.maxentities)
00433     {
00434         if (aasworld.entities[entnum].i.valid) return entnum;
00435     } //end while
00436     return 0;
00437 } //end of the function AAS_NextEntity

int AAS_OriginOfMoverWithModelNum int  modelnum,
vec3_t  origin
 

Definition at line 261 of file be_aas_entity.c.

References aas_entity_t, aasworld, aas_s::entities, aas_entity_s::i, i, aas_s::maxentities, aas_entityinfo_s::modelindex, aas_entityinfo_s::origin, aas_entityinfo_s::type, and VectorCopy.

Referenced by BotFuncBobStartEnd(), BotOnMover(), MoverBottomCenter(), and MoverDown().

00262 {
00263     int i;
00264     aas_entity_t *ent;
00265 
00266     for (i = 0; i < aasworld.maxentities; i++)
00267     {
00268         ent = &aasworld.entities[i];
00269         if (ent->i.type == ET_MOVER)
00270         {
00271             if (ent->i.modelindex == modelnum)
00272             {
00273                 VectorCopy(ent->i.origin, origin);
00274                 return qtrue;
00275             } //end if
00276         } //end if
00277     } //end for
00278     return qfalse;
00279 } //end of the function AAS_OriginOfMoverWithModelNum


Generated on Thu Aug 25 12:39:06 2005 for Quake III Arena by  doxygen 1.3.9.1