+//#define EDICT_TO_PROG(e) ((qbyte *)(((edict_t *)e)->v) - (qbyte *)(sv.edictsfields))
+//#define PROG_TO_EDICT(e) (sv.edicts + ((e) / (progs->entityfields * 4)))
+int EDICT_TO_PROG(edict_t *e)
+{
+ int n;
+ n = e - sv.edicts;
+ if ((unsigned int)n >= (unsigned int)sv.max_edicts)
+ Host_Error("EDICT_TO_PROG: invalid edict %8p (number %i compared to world at %8p)\n", e, n, sv.edicts);
+ return n;// EXPERIMENTAL
+ //return (qbyte *)e->v - (qbyte *)sv.edictsfields;