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);
294 for (
int tile = 0; tile < mapTiles->
numTiles; tile++) {
330 lineBox.
set(*traceBox, traceLine);
336 int newLevelMask = 0;
341 const vec_t upper = (
i + 1) * UNIT_HEIGHT;
342 if (minZ > upper || maxZ < lower)
344 newLevelMask |= (1 <<
i);
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)
void setLineAndBox(const Line &line, const AABB &box)
void getTileBox(AABB &box)
Calculate the bounding box for the tile (in mapunits)
bool canBeHitBy(const Line &line) const
Checks if the given line has a chance to hit our box.
static bool CM_LineMissesModel(const Line &tLine, const cBspModel_t *model)
A quick test if the trace might hit the inline model.
bool doesIntersect(const AABB &other) const
Checks if the aabb touches or intersects with the given aabb.
#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 set(const AABB &other)
Copies the values from the given aabb.
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,...)
Stores the data of a map tile, mostly the BSP stuff.
void expand(const float byVal)
expand the box in all directions, but clip them to the maximum boundaries
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.
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.
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...
void init(TR_TILE_TYPE *_tile, const int contentmask, const int brushreject, const float fraction)
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)
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...
#define PATHFINDING_HEIGHT
15 max, adjusting above 8 will require a rewrite to the DV code
#define VectorAdd(a, b, dest)
TR_TILE_TYPE mapTiles[MAX_MAPTILES]
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.
definitions common between client and server, but not game lib
void shift(const vec3_t shiftVec)
shove the whole box by the given vector
#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