22#include "../client/quakedef.h"
101#define FL_CLIENT (1<<3)
102#define FL_INWATER (1<<4)
103#define FL_MONSTER (1<<5)
104#define FL_GODMODE (1<<6)
105#define FL_NOTARGET (1<<7)
106#define FL_ITEM (1<<8)
107#define FL_ONGROUND (1<<9)
108#define FL_PARTIALGROUND (1<<10)
109#define FL_WATERJUMP (1<<11)
110#define FL_JUMPRELEASED (1<<12)
112#define FL_FINDABLE_NONSOLID (1<<14)
113#define FL_MOVECHAIN_ANGLE (1<<15)
114#define FLQW_LAGGEDMOVE (1<<16)
115#define FLH2_HUNTFACE (1<<16)
116#define FLH2_NOZ (1<<17)
119#define FL_HUBSAVERESET (1<<20)
120#define FL_CLASS_DEPENDENT (1<<21)
127#define MOVE_NOMONSTERS (1<<0)
128#define MOVE_MISSILE (1<<1)
130#define MOVE_WORLDONLY (MOVE_NOMONSTERS|MOVE_MISSILE)
132#define MOVE_HITMODEL (1<<2)
133#define MOVE_RESERVED (1<<3)
134#define MOVE_TRIGGERS (1<<4)
135#define MOVE_EVERYTHING (1<<5)
136#define MOVE_LAGGED (1<<6)
137#define MOVE_ENTCHAIN (1<<7)
138#define MOVE_OTHERONLY (1<<8)
139#define MOVE_IGNOREHULL (1u<<31)
144#define CALCAREAGRIDBOUNDS(w,min,max) \
145 ming[0] = floor(((min)[0]+(w)->gridbias[0]) / (w)->gridscale[0]); \
146 ming[1] = floor(((min)[1]+(w)->gridbias[1]) / (w)->gridscale[1]); \
147 maxg[0] = floor(((max)[0]+(w)->gridbias[0]) / (w)->gridscale[0]); \
148 maxg[1] = floor(((max)[1]+(w)->gridbias[1]) / (w)->gridscale[1]); \
149 ming[0] = bound(0, ming[0], (w)->gridsize[0]-1); \
150 ming[1] = bound(0, ming[1], (w)->gridsize[1]-1); \
151 maxg[0] = bound(ming[0], maxg[0], (w)->gridsize[0]-1)+1; \
152 maxg[1] = bound(ming[1], maxg[1], (w)->gridsize[1]-1)+1;
154#define EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,wedict_t,area)
157#if defined(Q2SERVER) || !defined(USEAREAGRID)
173#define PROG_TO_WEDICT (wedict_t*)PROG_TO_EDICT
174#define WEDICT_NUM_UB (wedict_t *)EDICT_NUM_UB
175#define WEDICT_NUM_PB (wedict_t *)EDICT_NUM_PB
176#define G_WEDICT (wedict_t *)G_EDICT
272#if defined(Q2SERVER) || !defined(USEAREAGRID)
334#define AREA_TRIGGER 2
342#define World_TouchAllLinks(w,e) World_TouchLinks(w,e,(w)->areanodes)
352qboolean World_TransformedTrace (
struct model_s *
model,
int hulloverride,
framestate_t *framestate,
vec3_t start,
vec3_t end,
vec3_t mins,
vec3_t maxs,
qboolean capsule,
struct trace_s *
trace,
vec3_t origin,
vec3_t angles,
unsigned int hitcontentsmask);
377 int maxcount,
int areatype);
383#if defined(CSQC_DAT) || !defined(CLIENTONLY)
cvar_t model
Definition: cl_main.c:153
void(QDECL *vgui_frame)(void)
entity_t * ent
Definition: com_mesh.c:717
trace plane dist
Definition: com_mesh.c:2551
dBodyID dBodyID body2
Definition: com_phys_ode.c:453
dBodyID body1
Definition: com_phys_ode.c:453
dVector3 gravity
Definition: com_phys_ode.c:306
unsigned char qbyte
Definition: common.h:127
struct @319::xidevinfo::@353 axis[2]
GLint GLenum type
Definition: glquake.h:157
GLuint GLcharARB * name
Definition: glquake.h:155
GLfloat GLfloat GLfloat GLfloat w
Definition: glquake.h:158
static png_size_t start
Definition: image.c:1419
vec3_t up
Definition: pmove.c:33
int const void * p
Definition: pr_lua.c:232
int64_t pint_t
Definition: progtype.h:20
double pvec_t
Definition: progtype.h:19
vec3_t end
Definition: r_d3.c:692
int axis
Definition: world.h:165
float dist
Definition: world.h:166
link_t edicts
Definition: world.h:168
struct areanode_s * children[2]
Definition: world.h:167
vec3_t normal
Definition: world.h:39
qbyte type
Definition: world.h:41
qbyte signbits
Definition: world.h:42
qbyte pad[2]
Definition: world.h:43
float dist
Definition: world.h:40
int flags
Definition: world.h:33
int value
Definition: world.h:34
vec3_t origin
Definition: world.h:181
vec3_t angles
Definition: world.h:182
qboolean present
Definition: world.h:180
Definition: gl_model.h:972
vec3_t normal
Definition: world.h:26
float dist
Definition: world.h:27
Definition: progslib.h:121
cplane_t plane
Definition: world.h:90
void * ent
Definition: world.h:93
int contents
Definition: world.h:92
qboolean startsolid
Definition: world.h:87
vec3_t endpos
Definition: world.h:89
const q2csurface_t * surface
Definition: world.h:91
qboolean allsolid
Definition: world.h:86
float fraction
Definition: world.h:88
Definition: progdefs.h:491
Definition: progdefs.h:496
Definition: progdefs.h:551
Definition: progdefs.h:515
Definition: progdefs.h:519
void(QDECL *RagDestroyJoint)(struct world_s *world
float * mat
Definition: world.h:191
rbejointinfo_t * info
Definition: world.h:193
double frametime
Definition: world.h:199
rbebody_t float * mat
Definition: world.h:194
wedict_t vec3_t vec3_t end
Definition: world.h:202
void(QDECL *End)(struct world_s *world)
void(QDECL *RagDestroyBody)(struct world_s *world
qboolean enabled
Definition: world.h:195
rbecommandqueue_t * cmd
Definition: world.h:200
void(QDECL *RemoveFromEntity)(struct world_s *world
rbebody_t rbebodyinfo_t * bodyinfo
Definition: world.h:192
wedict_t * ed
Definition: world.h:189
float truefraction
Definition: world.h:76
int brush_id
Definition: world.h:77
int triangle_id
Definition: world.h:80
const q2csurface_t * surface
Definition: world.h:69
void * ent
Definition: world.h:71
int entnum
Definition: world.h:73
qboolean allsolid
Definition: world.h:64
qboolean startsolid
Definition: world.h:65
int brush_face
Definition: world.h:78
float fraction
Definition: world.h:66
cplane_t plane
Definition: world.h:68
qboolean inopen
Definition: world.h:75
vec3_t endpos
Definition: world.h:67
int bone_id
Definition: world.h:81
unsigned int contents
Definition: world.h:70
qboolean inwater
Definition: world.h:75
int surface_id
Definition: world.h:79
Definition: pr_common.h:13
vec2_t gridbias
Definition: world.h:228
int numareanodes
Definition: world.h:275
qboolean(QDECL *Event_ContentsTransition)(struct world_s *w
qbyte * lastcheckpvs
Definition: world.h:240
unsigned int num_edicts
Definition: world.h:218
wedict_t int const char int float float float unsigned int flags
Definition: world.h:210
model_t *QDECL * Get_CModel(struct world_s *w, int modelindex)
wedict_t wedict_t trace_t * trace
Definition: world.h:208
pvec_t * time
Definition: world.h:253
wedict_t wedict_t * o
Definition: world.h:208
pvec_t * v_forward
Definition: world.h:257
size_t gridsize[2]
Definition: world.h:230
pvec_t * physics_mode
Definition: world.h:256
int areanodedepth
Definition: world.h:274
pint_t * newmis
Definition: world.h:252
double physicstime
Definition: world.h:236
pvec_t * v_right
Definition: world.h:258
struct pubprogfuncs_s * progs
Definition: world.h:221
qboolean remasterlogic
Definition: world.h:225
qboolean rbe_hasphysicsents
Definition: world.h:268
rigidbodyengine_t * rbe
Definition: world.h:269
pvec_t * frametime
Definition: world.h:254
unsigned int keydestmask
Definition: world.h:216
vec2_t gridscale
Definition: world.h:229
wedict_t int const char int float float float timeoffset
Definition: world.h:210
void * waypoints
Definition: world.h:282
pint_t * self
Definition: world.h:250
areagridlink_t portallist
Definition: world.h:233
wedict_t int const char int volume
Definition: world.h:210
pvec_t * drawfont
Definition: world.h:263
areanode_t portallist
Definition: world.h:277
wedict_t int channel
Definition: world.h:210
pvec_t * v_up
Definition: world.h:259
wedict_t framestate_t * fstate
Definition: world.h:213
wedict_t int oldwatertype
Definition: world.h:211
wedict_t * entity
Definition: world.h:210
unsigned int framenum
Definition: world.h:237
pvec_t * force_retouch
Definition: world.h:255
areagridlink_t * gridareas
Definition: world.h:231
unsigned int spawncount
Definition: world.h:224
double lastchecktime
Definition: world.h:239
wedict_t * edicts
Definition: world.h:220
float lagentstime
Definition: world.h:244
float lagentsfrac
Definition: world.h:243
void(QDECL *Event_Touch)(struct world_s *w
pint_t * other
Definition: world.h:251
void(QDECL *Event_Think)(struct world_s *w
pvec_t * defaultgravitydir
Definition: world.h:260
wedict_t int const char * sample
Definition: world.h:210
wedict_t * ent
Definition: world.h:211
unsigned int maxlagents
Definition: world.h:246
model_t * worldmodel
Definition: world.h:223
wedict_t int int newwatertype
Definition: world.h:211
unsigned int max_edicts
Definition: world.h:217
pvec_t * drawfontscale
Definition: world.h:264
wedict_t int const char int float float pitchadj
Definition: world.h:210
unsigned int edict_size
Definition: world.h:219
qboolean usesolidcorpse
Definition: world.h:222
areanode_t * areanodes
Definition: world.h:273
wedict_t int const char int float attenuation
Definition: world.h:210
areagridlink_t jumboarea
Definition: world.h:232
int lastcheck
Definition: world.h:238
wedict_t * s
Definition: world.h:208
laggedentinfo_t * lagents
Definition: world.h:245
wedict_t float timestamp
Definition: world.h:214
qboolean World_movestep(world_t *world, wedict_t *ent, vec3_t move, vec3_t axis[3], qboolean relink, qboolean noenemy, void(*set_move_trace)(pubprogfuncs_t *inst, trace_t *trace))
qboolean World_MoveToGoal(world_t *world, wedict_t *ent, float dist)
Definition: sv_move.c:598
void World_Physics_Frame(world_t *w)
Definition: sv_phys.c:2454
void WPhys_Init(void)
Definition: sv_phys.c:87
trace_t WPhys_Trace_Toss(world_t *w, wedict_t *ent, wedict_t *ignore)
Definition: sv_phys.c:2409
qboolean World_GetEntGravityAxis(wedict_t *ent, vec3_t axis[3])
Definition: sv_move.c:283
void World_RBE_Start(world_t *world)
Definition: world.c:2813
struct csurface_s q2csurface_t
void World_ClearWorld_Nodes(world_t *w, qboolean relink)
Definition: world.c:269
void WPhys_RunEntity(world_t *w, wedict_t *ent)
Definition: sv_phys.c:2178
int VARGS WorldQ2_AreaEdicts(world_t *w, const vec3_t mins, const vec3_t maxs, q2edict_t **list, int maxcount, int areatype)
Definition: world.c:1337
size_t areagridsequence
Definition: world.c:36
qboolean SV_Physics(void)
Definition: sv_phys.c:2554
void World_Destroy(world_t *w)
Definition: world.c:2822
qboolean World_TransformedTrace(struct model_s *model, int hulloverride, framestate_t *framestate, vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, qboolean capsule, struct trace_s *trace, vec3_t origin, vec3_t angles, unsigned int hitcontentsmask)
Definition: world.c:915
void SV_SetMoveVars(void)
Definition: sv_phys.c:2773
struct areanode_s areanode_t
qboolean QDECL World_RegisterPhysicsEngine(const char *enginename, void(QDECL *World_Bullet_Start)(world_t *world))
void QDECL World_LinkEdict(world_t *w, wedict_t *ent, qboolean touch_triggers)
Definition: world.c:512
void WPhys_RunNewmis(world_t *w)
Definition: sv_phys.c:2388
void VARGS WorldQ2_LinkEdict(world_t *w, q2edict_t *ent)
Definition: world.c:729
void PF_Common_RegisterCvars(void)
Definition: pr_bgcmd.c:57
qboolean World_CheckBottom(world_t *world, wedict_t *ent, vec3_t up)
Definition: sv_move.c:40
trace_t World_Move(world_t *w, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, wedict_t *passedict)
Definition: world.c:2396
void WPhys_CheckVelocity(world_t *w, wedict_t *ent)
Definition: sv_phys.c:154
int World_PointContentsAllBSPs(world_t *w, vec3_t p)
Definition: world.c:884
struct q2trace_s q2trace_t
void QDECL World_ReleaseCollisionMesh(wedict_t *ed)
Definition: world.c:3056
void World_RBE_Shutdown(world_t *world)
Definition: world.c:2774
qboolean QDECL World_GenerateCollisionMesh(world_t *world, model_t *mod, wedict_t *ed, vec3_t geomcenter)
Definition: world.c:3029
int World_PointContentsWorldOnly(world_t *w, vec3_t p)
Definition: world.c:879
qboolean WPhys_RunThink(world_t *w, wedict_t *ent)
Definition: sv_phys.c:214
void VARGS WorldQ2_UnlinkEdict(world_t *w, q2edict_t *ent)
Definition: world.c:721
void World_TouchLinks(world_t *w, wedict_t *ent, areanode_t *node)
Definition: world.c:432
void QDECL World_UnregisterPhysicsEngine(const char *enginename)
Definition: world.c:2795
void World_TouchAllLinks(world_t *w, wedict_t *ent)
Definition: world.c:1657
void World_UnlinkEdict(wedict_t *ent)
Definition: world.c:1699
void World_ClearWorld(world_t *w, qboolean relink)
Definition: world.c:395
int World_AreaEdicts(world_t *w, vec3_t mins, vec3_t maxs, wedict_t **list, int maxcount, int areatype)
Definition: world.c:1259
void SV_ProgStartFrame(void)
Definition: sv_phys.c:1576
trace_t WorldQ2_Move(world_t *w, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int hitcontentsmask, q2edict_t *passedict)
Definition: world.c:2730
wedict_t * World_TestEntityPosition(world_t *w, wedict_t *ent)
Definition: world.c:901