return e;
}
}
-
+
if (i == MAX_EDICTS)
Host_Error ("ED_Alloc: no free edicts");
-
+
sv.num_edicts++;
e = EDICT_NUM(i);
ED_ClearEdict (e);
VectorClear(ed->v->angles);
ed->v->nextthink = -1;
ed->v->solid = 0;
-
+
ed->freetime = sv.time;
}
{
ddef_t *def;
int i;
-
+
for (i=0 ; i<progs->numglobaldefs ; i++)
{
def = &pr_globaldefs[i];
{
ddef_t *def;
int i;
-
+
for (i=0 ; i<progs->numfielddefs ; i++)
{
def = &pr_fielddefs[i];
name = PR_GetString(def->s_name);
FS_Printf (f,"\"%s\" ", name);
- FS_Printf (f,"\"%s\"\n", PR_UglyValueString(type, (eval_t *)&pr_globals[def->ofs]));
+ FS_Printf (f,"\"%s\"\n", PR_UglyValueString(type, (eval_t *)&pr_globals[def->ofs]));
}
FS_Printf (f,"}\n");
}
case ev_string:
*(string_t *)d = PR_SetString(ED_NewString(s));
break;
-
+
case ev_float:
*(float *)d = atof (s);
break;
-
+
case ev_vector:
strcpy (string, s);
v = string;
ent = NULL;
inhibit = 0;
pr_global_struct->time = sv.time;
-
+
// parse ents
while (1)
{
{
if (((int)ent->v->spawnflags & SPAWNFLAG_NOT_DEATHMATCH))
{
- ED_Free (ent);
+ ED_Free (ent);
inhibit++;
continue;
}
PR_LoadProgs
===============
*/
+extern void PR_Cmd_Reset (void);
void PR_LoadProgs (void)
{
int i;
FindEdictFieldOffsets(); // LordHavoc: update field offset list
PR_Execute_ProgsLoaded();
+ PR_Cmd_Reset();
}
PR_Init
===============
*/
+extern void PR_Cmd_Init(void);
void PR_Init (void)
{
Cmd_AddCommand ("edict", ED_PrintEdict_f);
progs_mempool = Mem_AllocPool("progs.dat");
edictstring_mempool = Mem_AllocPool("edict strings");
+
+ PR_Cmd_Init();
}
// LordHavoc: turned EDICT_NUM into a #define for speed reasons