mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
nuke PR_InitEdicts as it's redundant and only used in the tools due to
forgetting to remove it
This commit is contained in:
parent
a4a5bb2d72
commit
3a3da6a1c4
3 changed files with 2 additions and 31 deletions
|
@ -512,31 +512,6 @@ ED_Count (progs_t *pr)
|
|||
Sys_Printf ("zombie :%3i\n", zombie);
|
||||
}
|
||||
|
||||
|
||||
edict_t *
|
||||
PR_InitEdicts (progs_t *pr, int num_edicts)
|
||||
{
|
||||
edict_t *edicts;
|
||||
edict_t *e;
|
||||
int i, j;
|
||||
|
||||
pr->pr_edictareasize = pr->pr_edict_size * num_edicts;
|
||||
edicts = Hunk_AllocName (pr->pr_edictareasize, "edicts");
|
||||
(*pr->edicts) = edicts;
|
||||
|
||||
if (pr_deadbeef_ents->int_val) {
|
||||
memset (edicts, 0, *pr->reserved_edicts * pr->pr_edict_size);
|
||||
for (j = *pr->reserved_edicts; j < num_edicts; j++) {
|
||||
e = EDICT_NUM (pr, j);
|
||||
for (i = 0; i < pr->progs->entityfields; i++)
|
||||
e->v[i].integer_var = 0xdeadbeef;
|
||||
}
|
||||
} else {
|
||||
memset (edicts, 0, pr->pr_edictareasize);
|
||||
}
|
||||
return edicts;
|
||||
}
|
||||
|
||||
edict_t *
|
||||
EDICT_NUM (progs_t *pr, int n)
|
||||
{
|
||||
|
|
|
@ -193,12 +193,10 @@ load_progs (const char *name)
|
|||
}
|
||||
Hash_FlushTable (func_tab);
|
||||
pr.progs_name = name;
|
||||
PR_LoadProgsFile (&pr, file, size, 0, 0);
|
||||
PR_LoadProgsFile (&pr, file, size, 1, 0);
|
||||
Qclose (file);
|
||||
PR_LoadStrings (&pr);
|
||||
|
||||
*pr.edicts = PR_InitEdicts (&pr, 1);
|
||||
|
||||
for (i = 0; i < pr.progs->numfunctions; i++) {
|
||||
if (pr.pr_functions[i].first_statement > 0)// don't bother with builtins
|
||||
Hash_AddElement (func_tab, &pr.pr_functions[i]);
|
||||
|
|
|
@ -94,7 +94,7 @@ main ()
|
|||
len = Qtell (f);
|
||||
Qseek (f, 0, SEEK_SET);
|
||||
com_filesize = len;
|
||||
PR_LoadProgsFile (&progs, f, len, 0, 1024 * 1024);
|
||||
PR_LoadProgsFile (&progs, f, len, 1, 1024 * 1024);
|
||||
Qclose (f);
|
||||
}
|
||||
if (!progs.progs)
|
||||
|
@ -108,8 +108,6 @@ main ()
|
|||
PR_RelocateBuiltins (&progs);
|
||||
PR_InitRuntime (&progs);
|
||||
|
||||
*progs.edicts = PR_InitEdicts (&progs, MAX_EDICTS);
|
||||
|
||||
read_result = (int*)PR_GetGlobalPointer (&progs, "read_result");
|
||||
main_func = PR_GetFunctionIndex (&progs, "main");
|
||||
PR_ExecuteProgram (&progs, main_func);
|
||||
|
|
Loading…
Reference in a new issue