From 2a2d6766266f6458ff29360fc01084e11a0f8b63 Mon Sep 17 00:00:00 2001 From: zaCade Date: Mon, 19 Aug 2019 15:24:17 +0200 Subject: [PATCH] General: Fix auto zspawn ignoring zspawn disables. --- src/zr/zspawn.inc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/zr/zspawn.inc b/src/zr/zspawn.inc index 4f1082f..eb4234e 100644 --- a/src/zr/zspawn.inc +++ b/src/zr/zspawn.inc @@ -122,9 +122,22 @@ ZSpawnOnClientDeath(client) */ ZSpawnOnClientClassPost(client) { - // Is auto zspawn enabled and is the client death? + // If zspawn is disabled, then stop. + new bool:zspawn = GetConVarBool(g_hCvarsList[CVAR_ZSPAWN]); + if (!zspawn) + { + return; + } + + // If auto zspawn is disabled, then stop. new bool:autozspawn = GetConVarBool(g_hCvarsList[CVAR_ZSPAWN_AUTO]); - if (autozspawn && !IsPlayerAlive(client) && !IsClientSourceTV(client)) + if (!autozspawn) + { + return; + } + + // Is the client death and not source-tv? + if (!IsPlayerAlive(client) && !IsClientSourceTV(client)) { // Get our zspawn condition. new ZSpawnCondition:condition = GetZSpawnCondition();