![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include "quakedef.h"
Go to the source code of this file.
Enumerations | |
enum | unstickresult_t { UNSTICK_STUCK = 0 , UNSTICK_GOOD = -1 , UNSTICK_UNSTUCK = 1 } |
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) |
unstickresult_t | PHYS_UnstickEntityReturnOffset (prvm_prog_t *prog, prvm_edict_t *ent, vec3_t offset) |
Variables | |
cvar_t | cl_gameplayfix_nudgeoutofsolid_separation |
enum unstickresult_t |
Enumerator | |
---|---|
UNSTICK_STUCK | |
UNSTICK_GOOD | didn't need to be unstuck |
UNSTICK_UNSTUCK |
Definition at line 9 of file phys.h.
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().
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().