29 #include "../shared/moveclip.h"
31 #include "../common/qfiles.h"
58 if (size[0] > size[1])
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++) {
sv_model_t svModels[MAX_MOD_KNOWN]
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)
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
void set(const Line &other)
Copies the values from the given Line.
bool isParentship(const SrvEdict *other) const
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)
is a variable sized structure, however all frame_t structures within the same file will have the same...
void SV_ClearWorld(void)
Clear physics interaction links.
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
struct worldSector_s * worldSector
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
bool doesIntersect(const AABB &other) const
Checks if the aabb touches or intersects with the given aabb.
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_UnlinkEdict(edict_t *ent)
call before removing an entity, and before trying to move one, so it doesn't clip against itself ...
int FS_LoadFile(const char *path, byte **buffer)
Filenames are relative to the quake search path.
void set(const AABB &other)
Copies the values from the given aabb.
void Com_Printf(const char *const fmt,...)
struct cBspModel_s * models[MAX_MODELS]
float SV_GetBounceFraction(const char *texture)
Different terrain types might have different bounce fraction.
The bounding box of a moving object.
void getDiagonal(vec3_t diagonal) const
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.
void add(const vec3_t point)
If the point is outside the box, expand the box to accommodate it.
void calcBounds()
Create the bounding box for the entire move.
struct worldSector_s * children[2]
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...
memPool_t * com_genericPool
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)
struct sv_edict_s * nextEntityInWorldSector
int SV_PointContents(const vec3_t p)
Returns the content flags for a given point.
void expandXY(const float byVal)
expand the box in four directions, but clip them to the maximum boundaries
static void SV_ModLoadObjModel(sv_model_t *mod, const byte *buffer, int bufferLength)
Loads the mins/maxs for a obj mesh model.
const edict_t * passedict
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.
the glcmd format: a positive integer starts a tristrip command, followed by that many vertex structur...
TR_TILE_TYPE mapTiles[MAX_MAPTILES]
int areaEdictListMaxCount
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...
sv_edict_t edicts[MAX_EDICTS]
unsigned int numWorldSectors
To avoid linearly searching through lists of entities during environment testing, the world is carved...
worldSector_t worldSectors[AREA_NODES]
static void SV_ModLoadAliasMD2Model(sv_model_t *mod, const byte *buffer)
Loads the mins/maxs for a md2 mesh model.
Different terrain definitions for footsteps and particles.
const char * footstepSound
#define Mem_PoolStrDup(in, pool, tagNum)
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)
static mesh models (none-animated) can have a server side flag set to be clipped for pathfinding ...
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
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.
Server side moveclip - see cmodel.c.
void FS_FreeFile(void *buffer)
static char const *const mod_extensions[]
all supported model formats