![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
Go to the source code of this file.
Macros | |
#define | EPSILON (1.0f / 32.0f) |
Functions | |
unstickresult_t | PHYS_NudgeOutOfSolid (prvm_prog_t *prog, prvm_edict_t *ent) |
qbool | PHYS_TestEntityPosition (prvm_prog_t *prog, prvm_edict_t *ent, vec3_t offset) |
static trace_t | PHYS_TraceBox (prvm_prog_t *prog, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend, qbool hitnetworkbrushmodels, qbool hitnetworkplayers, int *hitnetworkentity, qbool hitcsqcentities) |
unstickresult_t | PHYS_UnstickEntityReturnOffset (prvm_prog_t *prog, prvm_edict_t *ent, vec3_t offset) |
Variables | |
static float | unstickoffsets [] |
#define EPSILON (1.0f / 32.0f) |
Referenced by PHYS_TestEntityPosition().
unstickresult_t PHYS_NudgeOutOfSolid | ( | prvm_prog_t * | prog, |
prvm_edict_t * | ent ) |
move an entity that is stuck out of the surface it is stuck in (can move large amounts) with consideration to the properties of the surface and support for multiple surfaces. returns 1 if it found a better place, 0 if it remains stuck, -1 if it wasn't stuck. Replaces PHYS_UnstickEntityReturnOffset() but falls back to it when using cliphulls.
Definition at line 136 of file phys.c.
References trace_t::bmodelstartsolid, cl, cl_gameplayfix_nudgeoutofsolid_separation, CLVM_prog, collision_extendmovelength, trace_t::endpos, trace_t::fraction, maxs, mins, Mod_CollisionBIH_TraceBox(), MOVE_NOMONSTERS, MOVE_WORLDONLY, prvm_prog_t::name, NULL, origin, PHYS_TraceBox(), PHYS_UnstickEntityReturnOffset(), PRVM_serveredictvector, trace_t::startdepth, trace_t::startdepthnormal, sv, sv_gameplayfix_nudgeoutofsolid_separation, SV_GenericHitSuperContentsMask(), SVVM_prog, Sys_Error(), model_t::TraceBox, UNSTICK_GOOD, UNSTICK_STUCK, UNSTICK_UNSTUCK, cvar_t::value, VectorCopy, VectorMA, client_state_t::worldmodel, server_t::worldmodel, and trace_t::worldstartsolid.
Referenced by SV_UnstickEntity(), VM_nudgeoutofsolid(), and VM_SV_droptofloor().
qbool PHYS_TestEntityPosition | ( | prvm_prog_t * | prog, |
prvm_edict_t * | ent, | ||
vec3_t | offset ) |
Definition at line 24 of file phys.c.
References collision_extendmovelength, Con_Printf(), trace_t::endpos, EPSILON, i, maxs, mins, MOVE_NOMONSTERS, MOVE_WORLDONLY, movetype, MOVETYPE_FLY_WORLDONLY, NULL, offset, origin, PHYS_TraceBox(), PRVM_serveredictfloat, PRVM_serveredictvector, trace_t::startsolid, trace_t::startsupercontents, sv, SV_GenericHitSuperContentsMask(), SV_PointSuperContents(), v, cvar_t::value, VectorAdd, VectorCompare, VectorCopy, VectorDistance2, VectorSubtract, and server_t::worldmodel.
Referenced by PHYS_UnstickEntityReturnOffset(), and SV_UnstickEntity().
|
inlinestatic |
Definition at line 10 of file phys.c.
References CL_TraceBox(), maxs, mins, SV_TraceBox(), SVVM_prog, and type.
Referenced by PHYS_NudgeOutOfSolid(), and PHYS_TestEntityPosition().
unstickresult_t PHYS_UnstickEntityReturnOffset | ( | prvm_prog_t * | prog, |
prvm_edict_t * | ent, | ||
vec3_t | offset ) |
move an entity that is stuck by small amounts in various directions to try to nudge it back into the collision hull returns 1 if it found a better place, 0 if it remains stuck, -1 if it wasn't stuck. Replaces SV_TryUnstick() and SV_CheckStuck() which in Quake applied to players only.
Definition at line 102 of file phys.c.
References i, int(), maxs, mins, offset, PHYS_TestEntityPosition(), PRVM_serveredictvector, UNSTICK_GOOD, UNSTICK_STUCK, UNSTICK_UNSTUCK, unstickoffsets, vec3_origin, VectorClear, and VectorCopy.
Referenced by PHYS_NudgeOutOfSolid(), and SV_UnstickEntity().
|
static |
Definition at line 85 of file phys.c.
Referenced by PHYS_UnstickEntityReturnOffset().