mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 06:20:48 +00:00
Do not use the bodyqueue in single player
This commit is contained in:
parent
73d1b251d5
commit
9047d873ab
2 changed files with 23 additions and 10 deletions
|
@ -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));
|
||||||
|
|
|
@ -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";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue