From 3a3da6a1c49fd3f4768bd309aa58f56cb0a704ab Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 23 Oct 2002 15:55:38 +0000 Subject: [PATCH] nuke PR_InitEdicts as it's redundant and only used in the tools due to forgetting to remove it --- libs/gamecode/engine/pr_edict.c | 25 ------------------------- tools/qfprogs/source/qfprogs.c | 4 +--- tools/qwaq/main.c | 4 +--- 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/libs/gamecode/engine/pr_edict.c b/libs/gamecode/engine/pr_edict.c index 2de2d6ccd..fd1cfe658 100644 --- a/libs/gamecode/engine/pr_edict.c +++ b/libs/gamecode/engine/pr_edict.c @@ -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) { diff --git a/tools/qfprogs/source/qfprogs.c b/tools/qfprogs/source/qfprogs.c index b6fd475e8..b825da88e 100644 --- a/tools/qfprogs/source/qfprogs.c +++ b/tools/qfprogs/source/qfprogs.c @@ -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]); diff --git a/tools/qwaq/main.c b/tools/qwaq/main.c index a3c477921..6c77f2943 100644 --- a/tools/qwaq/main.c +++ b/tools/qwaq/main.c @@ -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);