From 9047d873ab868296dcab7aa0a39bb6e4105b80ab Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Tue, 4 Oct 2011 15:49:22 +0000 Subject: [PATCH] Do not use the bodyqueue in single player --- src/game/baseq2/g_utils.c | 14 ++++++++++++-- src/game/baseq2/p_client.c | 19 +++++++++++-------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/game/baseq2/g_utils.c b/src/game/baseq2/g_utils.c index 105c2879..bc2d10e0 100644 --- a/src/game/baseq2/g_utils.c +++ b/src/game/baseq2/g_utils.c @@ -546,9 +546,19 @@ G_FreeEdict(edict_t *ed) { 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)); diff --git a/src/game/baseq2/p_client.c b/src/game/baseq2/p_client.c index 8befef7b..83877e88 100644 --- a/src/game/baseq2/p_client.c +++ b/src/game/baseq2/p_client.c @@ -1192,15 +1192,18 @@ SelectSpawnPoint(edict_t *ent, vec3_t origin, vec3_t angles) void InitBodyQue(void) { - int i; - edict_t *ent; - - level.body_que = 0; - - for (i = 0; i < BODY_QUEUE_SIZE; i++) + if (deathmatch->value || coop->value) { - ent = G_Spawn(); - ent->classname = "bodyque"; + int i; + edict_t *ent; + + level.body_que = 0; + + for (i = 0; i < BODY_QUEUE_SIZE; i++) + { + ent = G_Spawn(); + ent->classname = "bodyque"; + } } }