mfunction_t *SV_PlayerPhysicsQC;
mfunction_t *EndFrameQC;
+//KrimZon - SERVER COMMANDS IN QUAKEC
+mfunction_t *SV_ParseClientCommandQC;
int FindFieldOffset(const char *field)
{
SV_PlayerPhysicsQC = ED_FindFunction ("SV_PlayerPhysics");
// LordHavoc: support for endframe
EndFrameQC = ED_FindFunction ("EndFrame");
+ //KrimZon - SERVER COMMANDS IN QUAKEC
+ SV_ParseClientCommandQC = ED_FindFunction ("SV_ParseClientCommand");
}
/*
void ED_ClearEdict (edict_t *e)
{
memset (e->v, 0, progs->entityfields * 4);
- e->free = false;
+ e->e->free = false;
}
/*
e = EDICT_NUM(i);
// the first couple seconds of server time can involve a lot of
// freeing and allocating, so relax the replacement policy
- if (e->free && ( e->freetime < 2 || sv.time - e->freetime > 0.5 ) )
+ if (e->e->free && ( e->e->freetime < 2 || sv.time - e->e->freetime > 0.5 ) )
{
ED_ClearEdict (e);
return e;
{
SV_UnlinkEdict (ed); // unlink from world bsp
- ed->free = true;
+ ed->e->free = true;
ed->v->model = 0;
ed->v->takedamage = 0;
ed->v->modelindex = 0;
ed->v->nextthink = -1;
ed->v->solid = 0;
- ed->freetime = sv.time;
+ ed->e->freetime = sv.time;
}
//===========================================================================
int type;
char tempstring[8192], tempstring2[260]; // temporary string buffers
- if (ed->free)
+ if (ed->e->free)
{
Con_Printf ("FREE\n");
return;
FS_Printf (f, "{\n");
- if (ed->free)
+ if (ed->e->free)
{
FS_Printf (f, "}\n");
return;
for (i=0 ; i<sv.num_edicts ; i++)
{
ent = EDICT_NUM(i);
- if (ent->free)
+ if (ent->e->free)
continue;
active++;
if (ent->v->solid)
}
if (!init)
- ent->free = true;
+ ent->e->free = true;
return data;
}
pr_global_struct->self = EDICT_TO_PROG(ent);
PR_ExecuteProgram (func - pr_functions, "");
spawned++;
- if (ent->free)
+ if (ent->e->free)
died++;
}
for (ednum = 0;ednum < MAX_EDICTS;ednum++)
{
ed = EDICT_NUM(ednum);
- if (ed->free)
+ if (ed->e->free)
continue;
for (i = 1;i < progs->numfielddefs;i++)
{
//}
//#define EDICT_TO_PROG(e) ((qbyte *)(((edict_t *)e)->v) - (qbyte *)(sv.edictsfields))
-//#define PROG_TO_EDICT(e) (sv.edictstable[(e) / (progs->entityfields * 4)])
+//#define PROG_TO_EDICT(e) (sv.edicts + ((e) / (progs->entityfields * 4)))
int EDICT_TO_PROG(edict_t *e)
{
int n;
{
if ((unsigned int)n >= (unsigned int)sv.max_edicts)
Host_Error("PROG_TO_EDICT: invalid edict number %i\n", n);
- return sv.edictstable[n]; // EXPERIMENTAL
- //return sv.edictstable[(n) / (progs->entityfields * 4)];
+ return sv.edicts + n; // EXPERIMENTAL
+ //return sv.edicts + ((n) / (progs->entityfields * 4));
}
*/