Go to the documentation of this file.
37 #define STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (intptr_t)&(((t *)0)->m)))
39 #define EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area)
95 vec3_t mins1, maxs1, mins2, maxs2;
111 if (size[0] > size[1])
116 anode->
dist = 0.5 * (maxs[anode->
axis] + mins[anode->
axis]);
165 #define MAX_TOTAL_ENT_LEAFS 128
198 j = (-ent->
mins[2])/8;
205 k = (ent->
maxs[2]+32)/8;
211 ent->
s.
solid = (k<<10) | (
j<<5) |
i;
228 for (
i=0 ;
i<3 ;
i++)
237 for (
i=0 ;
i<3 ;
i++)
268 for (
i=0 ;
i<num_leafs ;
i++)
278 Com_DPrintf (
"Object touching 3 areas at %f %f %f\n",
295 for (
i=0 ;
i<num_leafs ;
i++)
297 if (clusters[
i] == -1)
299 for (
j=0 ;
j<
i ;
j++)
300 if (clusters[
j] == clusters[
i])
330 if (node->
axis == -1)
369 for (l=start->
next ; l != start ; l = next)
394 if (node->
axis == -1)
410 int maxcount,
int areatype)
446 for (
i=0 ;
i<num ;
i++)
531 for (
i=0 ;
i<num ;
i++)
533 touch = touchlist[
i];
594 boxmins[0] = boxmins[1] = boxmins[2] = -9999;
595 boxmaxs[0] = boxmaxs[1] = boxmaxs[2] = 9999;
599 for (
i=0 ;
i<3 ;
i++)
601 if (end[
i] > start[
i])
603 boxmins[
i] = start[
i] + mins[
i] - 1;
604 boxmaxs[
i] = end[
i] + maxs[
i] + 1;
608 boxmins[
i] = end[
i] + mins[
i] - 1;
609 boxmaxs[
i] = start[
i] + maxs[
i] + 1;
void SV_TraceBounds(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, vec3_t boxmins, vec3_t boxmaxs)
trace_t CM_BoxTrace(vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, int headnode, int brushmask)
#define VectorSubtract(a, b, c)
void InsertLinkBefore(link_t *l, link_t *before)
int SV_PointContents(vec3_t p)
#define CONTENTS_DEADMONSTER
#define MAX_TOTAL_ENT_LEAFS
#define EDICT_FROM_AREA(l)
int SV_HullForEntity(edict_t *ent)
int CM_TransformedPointContents(vec3_t p, int headnode, vec3_t origin, vec3_t angles)
void SV_AreaEdicts_r(areanode_t *node)
int clusternums[MAX_ENT_CLUSTERS]
void ClearLink(link_t *l)
int CM_LeafArea(int leafnum)
int SV_AreaEdicts(vec3_t mins, vec3_t maxs, edict_t **list, int maxcount, int areatype)
int CM_PointContents(vec3_t p, int headnode)
void RemoveLink(link_t *l)
struct cmodel_s * models[MAX_MODELS]
areanode_t sv_areanodes[AREA_NODES]
void Com_Error(int code, char *fmt,...)
int CM_BoxLeafnums(vec3_t mins, vec3_t maxs, int *list, int listsize, int *topnode)
#define VectorAdd(a, b, c)
void SV_ClipMoveToEntities(moveclip_t *clip)
struct areanode_s areanode_t
int CM_HeadnodeForBox(vec3_t mins, vec3_t maxs)
int CM_LeafCluster(int leafnum)
void SV_UnlinkEdict(edict_t *ent)
areanode_t * SV_CreateAreaNode(int depth, vec3_t mins, vec3_t maxs)
void SV_LinkEdict(edict_t *ent)
void Com_DPrintf(char *fmt,...)
trace_t SV_Trace(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passedict, int contentmask)
void Com_Printf(char *fmt,...)
struct areanode_s * children[2]
trace_t CM_TransformedBoxTrace(vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, int headnode, int brushmask, vec3_t origin, vec3_t angles)