From f688caa492fddc9d314cb25514b6ef293dc1de87 Mon Sep 17 00:00:00 2001 From: black Date: Fri, 29 Oct 2004 14:37:19 +0000 Subject: [PATCH] -Moved the entity mem init in the entity load functions around a bit to make it possible for the menu parser to support full templates. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4723 d7cf8633-e32d-0410-b094-e92efae38249 --- prvm_edict.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prvm_edict.c b/prvm_edict.c index a99f5fdf..6fe41fa0 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -1042,10 +1042,6 @@ const char *PRVM_ED_ParseEdict (const char *data, prvm_edict_t *ent) init = false; -// clear it - if (ent != prog->edicts) // hack - memset (ent->v, 0, prog->progs->entityfields * 4); - // go through all the dictionary pairs while (1) { @@ -1160,6 +1156,10 @@ void PRVM_ED_LoadFromFile (const char *data) else ent = PRVM_ED_Alloc(); + // clear it + if (ent != prog->edicts) // hack + memset (ent->v, 0, prog->progs->entityfields * 4); + data = PRVM_ED_ParseEdict (data, ent); parsed++; -- 2.39.2