.float clipgroup;
//description:
//If two entities have this field set to the same non-zero integer value, they won't collide with each other.
+
+//idea: eukara
+//darkplaces implementation: Cloudwalk
+// Do NOT use in production yet.
+string __fullspawndata;
+//description:
+// http://icculus.org/finger/marco?date=2019-01-25&time=05-38-02
void PRVM_ED_LoadFromFile (prvm_prog_t *prog, const char *data)
{
prvm_edict_t *ent;
+ const char *start;
int parsed, inhibited, spawned, died;
+ ddef_t *fulldata_ddef = NULL;
+ prvm_eval_t *fulldata = NULL;
const char *funcname;
mfunction_t *func;
char vabuf[1024];
// clear it
if (ent != prog->edicts) // hack
memset (ent->fields.fp, 0, prog->entityfields * sizeof(prvm_vec_t));
-
+ start = data;
data = PRVM_ED_ParseEdict (prog, data, ent);
parsed++;
PRVM_ED_Free (prog, ent);
continue;
}
+ /*
+ * This is required for FTE compatibility (FreeCS).
+ * It copies the key/value pairs themselves into a
+ * global for QC to parse on its own.
+ */
+ else
+ {
+ fulldata_ddef = PRVM_ED_FindGlobal(prog, "__fullspawndata");
+ if(fulldata_ddef)
+ fulldata = (prvm_eval_t *) &prog->globals.fp[fulldata_ddef->ofs];
+ if(fulldata)
+ {
+ const char *in;
+ char *spawndata;
+ fulldata->string = PRVM_AllocString(prog, data - start + 1, &spawndata);
+ for(in = start; in < data; )
+ {
+ char c = *in++;
+ if(c == '\n')
+ *spawndata++ = '\t';
+ else
+ *spawndata++ = c;
+ }
+ *spawndata = 0;
+ }
+ }
// look for the spawn function
funcname = PRVM_GetString(prog, PRVM_alledictstring(ent, classname));