git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2944
d7cf8633-e32d-0410-b094-
e92efae38249
void ED_LoadFromFile (const char *data)
{
edict_t *ent;
void ED_LoadFromFile (const char *data)
{
edict_t *ent;
+ int parsed, inhibited, spawned, died;
mfunction_t *func;
ent = NULL;
mfunction_t *func;
ent = NULL;
+ parsed = 0;
+ inhibited = 0;
+ spawned = 0;
+ died = 0;
pr_global_struct->time = sv.time;
// parse ents
pr_global_struct->time = sv.time;
// parse ents
else
ent = ED_Alloc ();
data = ED_ParseEdict (data, ent);
else
ent = ED_Alloc ();
data = ED_ParseEdict (data, ent);
// remove things from different skill levels or deathmatch
if (deathmatch.integer)
// remove things from different skill levels or deathmatch
if (deathmatch.integer)
if (((int)ent->v->spawnflags & SPAWNFLAG_NOT_DEATHMATCH))
{
ED_Free (ent);
if (((int)ent->v->spawnflags & SPAWNFLAG_NOT_DEATHMATCH))
{
ED_Free (ent);
|| (current_skill >= 2 && ((int)ent->v->spawnflags & SPAWNFLAG_NOT_HARD )))
{
ED_Free (ent);
|| (current_skill >= 2 && ((int)ent->v->spawnflags & SPAWNFLAG_NOT_HARD )))
{
ED_Free (ent);
pr_global_struct->self = EDICT_TO_PROG(ent);
PR_ExecuteProgram (func - pr_functions, "");
pr_global_struct->self = EDICT_TO_PROG(ent);
PR_ExecuteProgram (func - pr_functions, "");
+ spawned++;
+ if (ent->free)
+ died++;
- Con_DPrintf ("%i entities inhibited\n", inhibit);
+ Con_DPrintf ("%i entities parsed, %i inhibited, %i spawned (%i removed self, %i stayed)\n", parsed, inhibited, spawned, died, spawned - died);