46 sv->numWorldSectors++;
123 Com_Printf(
"WARNING: SV_UnlinkEntity: not found in worldSector\n");
139 if (ent ==
svs.ge->edicts)
158 node =
sv->worldSectors;
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++) {
566 if (
i ==
sv->numSVModels) {
void expandXY(const float byVal)
expand the box in four directions, but clip them to the maximum boundaries
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
void getDiagonal(vec3_t diagonal) const
void set(const AABB &other)
Copies the values from the given aabb.
void add(const vec3_t point)
If the point is outside the box, expand the box to accommodate it.
bool doesIntersect(const AABB &other) const
Checks if the aabb touches or intersects with the given aabb.
void set(const Line &other)
Copies the values from the given Line.
The bounding box of a moving object.
void calcBounds()
Create the bounding box for the entire move.
Server side moveclip - see cmodel.c.
const edict_t * passedict
bool isParentship(const SrvEdict *other) const
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.
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.
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 Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
void Com_Error(int code, const char *fmt,...)
void Com_Printf(const char *const fmt,...)
memPool_t * com_genericPool
int FS_LoadFile(const char *path, byte **buffer)
Filenames are relative to the quake search path.
void FS_FreeFile(void *buffer)
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).
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 Mem_PoolStrDup(in, pool, tagNum)
Header for various formats like pak, and model formats as well as bsp format.
static char const *const mod_extensions[]
all supported model formats
const terrainType_t * Com_GetTerrainType(const char *textureName)
Searches the terrain definition if given.
Main server include file.
serverInstanceGame_t * sv
serverInstanceStatic_t svs
#define Q_strcasecmp(a, b)
const char * Com_GetExtension(const char *path)
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
int areaEdictListMaxCount
is a variable sized structure, however all frame_t structures within the same file will have the same...
the glcmd format: a positive integer starts a tristrip command, followed by that many vertex structur...
struct worldSector_s * worldSector
struct sv_edict_s * nextEntityInWorldSector
static mesh models (none-animated) can have a server side flag set to be clipped for pathfinding
Different terrain definitions for footsteps and particles.
const char * footstepSound
To avoid linearly searching through lists of entities during environment testing, the world is carved...
struct worldSector_s * children[2]
static int SV_AreaEdicts(const AABB &abox, edict_t **list, int maxCount)
const char * SV_GetFootstepSound(const char *texture)
Query the footstep sound for the given surface texture.
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.
void SV_ClearWorld(void)
Clear physics interaction links.
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 SV_LinkEdict(edict_t *ent)
Needs to be called any time an entity changes origin, mins, maxs, or solid. Automatically unlinks if ...
static void SV_ModLoadAliasMD2Model(sv_model_t *mod, const byte *buffer)
Loads the mins/maxs for a md2 mesh model.
static void SV_ModLoadObjModel(sv_model_t *mod, const byte *buffer, int bufferLength)
Loads the mins/maxs for a obj mesh model.
float SV_GetBounceFraction(const char *texture)
Different terrain types might have different bounce fraction.
static sv_edict_t * SV_GetServerDataForEdict(const edict_t *ent)
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...
bool SV_LoadModelAABB(const char *model, int frame, AABB &aabb)
Load the bounding box for the model on the serverside for pathfinding and clipping.
static void SV_ClipMoveToEntities(MoveClipSV *clip)
void SV_UnlinkEdict(edict_t *ent)
call before removing an entity, and before trying to move one, so it doesn't clip against itself
static void SV_ModLoadAliasMD3Model(sv_model_t *mod, const byte *buffer)
Loads the mins/maxs for a md3 mesh model.
int SV_PointContents(const vec3_t p)
Returns the content flags for a given point.
static worldSector_t * SV_CreateWorldSector(int depth, const AABB &sBox)
Builds a uniformly subdivided tree for the given world size.
static const vec3_t scale
#define VectorCopy(src, dest)