125 traceData.
init(&tile, contentmask, brushrejects, fraction);
130 if (rotated && trace.
fraction != 1.0f) {
232 float fraction = 2.0f;
241 if (*
name[0] !=
'*') {
243 Com_Error(
ERR_DROP,
"name in the inlineList is no inline model: '%s' (inlines: %p, name: %p)",
244 *
name, (
void*)entlist, (
void*)
name);
291 moveBox.
set(box, trLine);
330 lineBox.
set(*traceBox, traceLine);
336 int newLevelMask = 0;
342 if (minZ > upper || maxZ < lower)
344 newLevelMask |= (1 <<
i);
349 if (!list ||
tr.fraction == 0.0f)
trace_t CM_EntCompleteBoxTrace(mapTiles_t *mapTiles, const Line &traceLine, const AABB *traceBox, int levelmask, int brushmask, int brushreject, const char **list)
Performs box traces against the world and all inline models, gives the hit position back...
trace_t TR_BoxTrace(boxtrace_t &traceData, const Line &traceLine, const AABB &traceBox, const int headnode, const float fraction)
This function traces a line from start to end. It returns a trace_t indicating what portion of the li...
#define VectorCopy(src, dest)
TR_TILE_TYPE mapTiles[MAX_MAPTILES]
bool doesIntersect(const AABB &other) const
Checks if the aabb touches or intersects with the given aabb.
static bool CM_LineMissesModel(const Line &tLine, const cBspModel_t *model)
A quick test if the trace might hit the inline model.
#define VectorNegate(src, dest)
trace_t TR_TileBoxTrace(TR_TILE_TYPE *myTile, const Line &traceLine, const AABB &aabb, const int levelmask, const int brushmask, const int brushreject)
Traces all submodels in the specified tile. Provides for a short circuit if the trace tries to move p...
void init(TR_TILE_TYPE *_tile, const int contentmask, const int brushreject, const float fraction)
bool CM_EntTestLineDM(mapTiles_t *mapTiles, const Line &trLine, vec3_t hit, const int levelmask, const char **entlist)
Checks traces against the world and all inline models, gives the hit position back.
#define MASK_VISIBILILITY
#define TL_FLAG_ACTORCLIP
void Com_Error(int code, const char *fmt,...)
trace_t CM_HintedTransformedBoxTrace(MapTile &tile, const Line &traceLine, const AABB &traceBox, const int headnode, const int contentmask, const int brushrejects, const vec3_t origin, const vec3_t angles, const vec3_t rmaShift, const float fraction)
Handles offseting and rotation of the end points for moving and rotating entities.
Stores the data of a map tile, mostly the BSP stuff.
void setLineAndBox(const Line &line, const AABB &box)
void AngleVectors(const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Create the rotation matrix in order to rotate something.
bool TR_TestLineDM(mapTiles_t *mapTiles, const vec3_t start, const vec3_t end, vec3_t hit, const int levelmask)
Checks traces against the world, gives hit position back.
#define DotProduct(x, y)
Returns the distance between two 3-dimensional vectors.
void set(const AABB &other)
Copies the values from the given aabb.
int32_t CM_HeadnodeForBox(MapTile &tile, const AABB &box)
To keep everything totally uniform, bounding boxes are turned into small BSP trees instead of being c...
bool canBeHitBy(const Line &line) const
Checks if the given line has a chance to hit our box.
bool CM_EntTestLine(mapTiles_t *mapTiles, const Line &traceLine, const int levelmask, const char **entlist)
Checks traces against the world and all inline models.
#define VectorInterpolation(p1, p2, frac, mid)
#define VectorNotEmpty(a)
void shift(const vec3_t shiftVec)
shove the whole box by the given vector
cBspModel_t * CM_InlineModel(const mapTiles_t *mapTiles, const char *name)
Searches all inline models and return the cBspModel_t pointer for the given modelnumber or -name...
void getTileBox(AABB &box)
Calculate the bounding box for the tile (in mapunits)
#define PATHFINDING_HEIGHT
15 max, adjusting above 8 will require a rewrite to the DV code
#define VectorAdd(a, b, dest)
static void CM_CalculateWidestBoundingBox(const cBspModel_t *model, AABB &box)
Calculates the worst case bounding box for the given bsp model.
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
bool TR_TestLine(mapTiles_t *mapTiles, const vec3_t start, const vec3_t end, const int levelmask)
Checks traces against the world.
void expand(const float byVal)
expand the box in all directions, but clip them to the maximum boundaries
definitions common between client and server, but not game lib
#define VectorSubtract(a, b, dest)
trace_t CM_CompleteBoxTrace(mapTiles_t *mapTiles, const Line &trLine, const AABB &box, int levelmask, int brushmask, int brushreject)
Traces all submodels in all tiles. Used by ufo and ufo_ded.
static mapTiles_t mapTiles