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;
// returns a copy of the string allocated from the server's string heap
void ED_Print (edict_t *ed);
-void ED_Write (QFile *f, edict_t *ed);
+void ED_Write (qfile_t *f, edict_t *ed);
const char *ED_ParseEdict (const char *data, edict_t *ent);
-void ED_WriteGlobals (QFile *f);
+void ED_WriteGlobals (qfile_t *f);
void ED_ParseGlobals (const char *data);
void ED_LoadFromFile (const char *data);
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;