]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_edict.c
308
[xonotic/darkplaces.git] / prvm_edict.c
index a99f5fdfd97f3d64d7612cc52c4e8a5752994296..6fe41fa02edde45843f2a97c8ec55597bbf2153f 100644 (file)
@@ -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++;