typedef struct link_s
{
+ void *entity;
struct link_s *prev, *next;
} link_t;
+#define ENTITYGRIDAREAS 16
+
// the entire server entity structure
typedef struct edict_s
{
// true if this edict is unused
qboolean free;
- // physics area this edict is linked into
- link_t area;
+ // physics grid areas this edict is linked into
+ link_t areagrid[ENTITYGRIDAREAS];
+ // since the areagrid can have multiple references to one entity,
+ // we should avoid extensive checking on entities already encountered
+ int areagridmarknumber;
// old entity protocol, not used
#ifdef QUAKEENTITIES
#define GETEDICTFIELDVALUE(ed, fieldoffset) (fieldoffset ? (eval_t *)((qbyte *)ed->v + fieldoffset) : NULL)
-extern dfunction_t *SV_PlayerPhysicsQC;
-extern dfunction_t *EndFrameQC;
+extern mfunction_t *SV_PlayerPhysicsQC;
+extern mfunction_t *EndFrameQC;
//============================================================================
extern dprograms_t *progs;
-extern dfunction_t *pr_functions;
+extern mfunction_t *pr_functions;
extern char *pr_strings;
extern ddef_t *pr_globaldefs;
extern ddef_t *pr_fielddefs;
extern int pr_argc;
extern int pr_trace;
-extern dfunction_t *pr_xfunction;
+extern mfunction_t *pr_xfunction;
extern int pr_xstatement;
extern unsigned short pr_crc;