Do not use the bodyqueue in single player

This commit is contained in:
Yamagi Burmeister 2011-10-04 15:49:22 +00:00
parent 73d1b251d5
commit 9047d873ab
2 changed files with 23 additions and 10 deletions

View file

@ -546,9 +546,19 @@ G_FreeEdict(edict_t *ed)
{ {
gi.unlinkentity(ed); /* unlink from world */ gi.unlinkentity(ed); /* unlink from world */
if ((ed - g_edicts) <= (maxclients->value + BODY_QUEUE_SIZE)) if (deathmatch->value || coop->value)
{ {
return; if ((ed - g_edicts) <= (maxclients->value + BODY_QUEUE_SIZE))
{
return;
}
}
else
{
if ((ed - g_edicts) <= maxclients->value)
{
return;
}
} }
memset(ed, 0, sizeof(*ed)); memset(ed, 0, sizeof(*ed));

View file

@ -1192,15 +1192,18 @@ SelectSpawnPoint(edict_t *ent, vec3_t origin, vec3_t angles)
void void
InitBodyQue(void) InitBodyQue(void)
{ {
int i; if (deathmatch->value || coop->value)
edict_t *ent;
level.body_que = 0;
for (i = 0; i < BODY_QUEUE_SIZE; i++)
{ {
ent = G_Spawn(); int i;
ent->classname = "bodyque"; edict_t *ent;
level.body_que = 0;
for (i = 0; i < BODY_QUEUE_SIZE; i++)
{
ent = G_Spawn();
ent->classname = "bodyque";
}
} }
} }