29 #include "../shared/moveclip.h" 31 #include "../common/qfiles.h" 123 Com_Printf(
"WARNING: SV_UnlinkEntity: not found in worldSector\n");
217 for (check = node->
entities; check; check = next) {
330 for (
int i = 0;
i < num;
i++) {
481 if (mod->
frame > num_frames)
484 for (
int j = 0; j < 3; j++) {
506 if (mod->
frame > num_frames)
510 for (
int j = 0; j < 3; j++) {
534 "md2",
"md3",
"obj",
nullptr 550 if (model[0] ==
'\0')
554 for (
i = 0, mod =
sv->
svModels; i < sv->numSVModels;
i++, mod++)
561 for (
i = 0, mod =
sv->
svModels; i < sv->numSVModels;
i++, mod++) {
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
void CalculateMinsMaxs(const vec3_t angles, const AABB &relBox, const vec3_t origin, AABB &absBox)
Calculates the bounding box in absolute coordinates, also for rotating objects. WARNING: do not use t...
#define VectorCopy(src, dest)
TR_TILE_TYPE mapTiles[MAX_MAPTILES]
int areaEdictListMaxCount
void VectorMA(const vec3_t veca, const float scale, const vec3_t vecb, vec3_t outVector)
Sets vector_out (vc) to vevtor1 (va) + scale * vector2 (vb)
static void SV_ClipMoveToEntities(MoveClipSV *clip)
const char * Com_GetExtension(const char *path)
bool doesIntersect(const AABB &other) const
Checks if the aabb touches or intersects with the given aabb.
void SV_ClearWorld(void)
Clear physics interaction links.
static mesh models (none-animated) can have a server side flag set to be clipped for pathfinding ...
bool SV_LoadModelAABB(const char *model, int frame, AABB &aabb)
Load the bounding box for the model on the serverside for pathfinding and clipping.
const terrainType_t * Com_GetTerrainType(const char *textureName)
Searches the terrain definition if given.
static const vec3_t scale
void getDiagonal(vec3_t diagonal) const
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
static int SV_HullForEntity(const edict_t *ent, int *tile, vec3_t rmaShift)
Returns a headnode that can be used for testing or clipping an object of mins/maxs size...
void set(const Line &other)
Copies the values from the given Line.
bool isParentship(const SrvEdict *other) const
void SV_UnlinkEdict(edict_t *ent)
call before removing an entity, and before trying to move one, so it doesn't clip against itself ...
void expandXY(const float byVal)
expand the box in four directions, but clip them to the maximum boundaries
int FS_LoadFile(const char *path, byte **buffer)
Filenames are relative to the quake search path.
void Com_Printf(const char *const fmt,...)
struct worldSector_s * worldSector
float SV_GetBounceFraction(const char *texture)
Different terrain types might have different bounce fraction.
The bounding box of a moving object.
const char * footstepSound
sv_model_t svModels[MAX_MOD_KNOWN]
worldSector_t worldSectors[AREA_NODES]
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.
serverInstanceGame_t * sv
const char * SV_GetFootstepSound(const char *texture)
Query the footstep sound for the given surface texture.
Server side moveclip - see cmodel.c.
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...
struct worldSector_s * children[2]
memPool_t * com_genericPool
To avoid linearly searching through lists of entities during environment testing, the world is carved...
Main server include file.
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
#define Q_strcasecmp(a, b)
Different terrain definitions for footsteps and particles.
void calcBounds()
Create the bounding box for the entire move.
int SV_PointContents(const vec3_t p)
Returns the content flags for a given point.
static void SV_ModLoadObjModel(sv_model_t *mod, const byte *buffer, int bufferLength)
Loads the mins/maxs for a obj mesh model.
is a variable sized structure, however all frame_t structures within the same file will have the same...
unsigned int numWorldSectors
trace_t SV_Trace(const Line &traceLine, const AABB &box, const edict_t *passedict, int contentmask)
Moves the given mins/maxs volume through the world from start to end.
static worldSector_t * SV_CreateWorldSector(int depth, const AABB &sBox)
Builds a uniformly subdivided tree for the given world size.
static bool SV_BoundingBoxesIntersect(const AABB &aabb, const edict_t *ent)
Checks whether the bounding box of the given edict will intersect with the given bbox.
static void SV_AreaEdicts_r(worldSector_t *node, areaParms_t *ap)
fills in a table of edict pointers with edicts that have bounding boxes that intersect the given area...
void add(const vec3_t point)
If the point is outside the box, expand the box to accommodate it.
const edict_t * passedict
struct sv_edict_s * nextEntityInWorldSector
static void SV_ModLoadAliasMD2Model(sv_model_t *mod, const byte *buffer)
Loads the mins/maxs for a md2 mesh model.
#define Mem_PoolStrDup(in, pool, tagNum)
struct cBspModel_s * models[MAX_MODELS]
static void SV_ModLoadAliasMD3Model(sv_model_t *mod, const byte *buffer)
Loads the mins/maxs for a md3 mesh model.
static sv_edict_t * SV_GetServerDataForEdict(const edict_t *ent)
static int SV_AreaEdicts(const AABB &abox, edict_t **list, int maxCount)
void SV_LinkEdict(edict_t *ent)
Needs to be called any time an entity changes origin, mins, maxs, or solid. Automatically unlinks if ...
serverInstanceStatic_t svs
the glcmd format: a positive integer starts a tristrip command, followed by that many vertex structur...
sv_edict_t edicts[MAX_EDICTS]
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.
void FS_FreeFile(void *buffer)
static char const *const mod_extensions[]
all supported model formats