mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-18 10:02:12 +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,10 +546,20 @@ G_FreeEdict(edict_t *ed)
|
|||
{
|
||||
gi.unlinkentity(ed); /* unlink from world */
|
||||
|
||||
if (deathmatch->value || coop->value)
|
||||
{
|
||||
if ((ed - g_edicts) <= (maxclients->value + BODY_QUEUE_SIZE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((ed - g_edicts) <= maxclients->value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
memset(ed, 0, sizeof(*ed));
|
||||
ed->classname = "freed";
|
||||
|
|
|
@ -1191,6 +1191,8 @@ SelectSpawnPoint(edict_t *ent, vec3_t origin, vec3_t angles)
|
|||
|
||||
void
|
||||
InitBodyQue(void)
|
||||
{
|
||||
if (deathmatch->value || coop->value)
|
||||
{
|
||||
int i;
|
||||
edict_t *ent;
|
||||
|
@ -1203,6 +1205,7 @@ InitBodyQue(void)
|
|||
ent->classname = "bodyque";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
body_die(edict_t *self, edict_t *inflictor /* unused */,
|
||||
|
|
Loading…
Reference in a new issue