From c61d29fd63d3ee1c4c8980cf031ec2d7f3fcf4db Mon Sep 17 00:00:00 2001 From: Richard Helgeby Date: Sun, 14 Jul 2013 12:35:09 +0200 Subject: [PATCH] Fixed respawn module ignoring zr_respawn_team_zombie_world cvar. Improved description of zr_respawn_team_zombie_world. --- .../cfg/sourcemod/zombiereloaded/zombiereloaded.cfg | 2 +- src/zr/cvars.inc | 2 +- src/zr/respawn.inc | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg b/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg index a083f5d..5f403af 100644 --- a/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg +++ b/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg @@ -635,7 +635,7 @@ zr_respawn_delay "1" // Default: "1" zr_respawn_team_zombie "1" -// Respawn player as a zombie if player was killed by the world. [Override: zr_respawn_team_zombie] +// Respawn player as a zombie if player was a zombie and killed by world damage. [Override: zr_respawn_team_zombie] // Default: "1" zr_respawn_team_zombie_world "1" diff --git a/src/zr/cvars.inc b/src/zr/cvars.inc index 04efcf4..24130aa 100644 --- a/src/zr/cvars.inc +++ b/src/zr/cvars.inc @@ -463,7 +463,7 @@ CvarsCreate() g_hCvarsList[CVAR_RESPAWN] = CreateConVar("zr_respawn", "0", "Respawn players after death. [Recommended: (Enable) zr_zspawn*]"); g_hCvarsList[CVAR_RESPAWN_DELAY] = CreateConVar("zr_respawn_delay", "1", "Time after death to delay player respawn. [Dependency: zr_respawn]"); g_hCvarsList[CVAR_RESPAWN_TEAM_ZOMBIE] = CreateConVar("zr_respawn_team_zombie", "1", "Respawn player as a zombie. [Dependency: zr_respawn]"); - g_hCvarsList[CVAR_RESPAWN_TEAM_ZOMBIE_WORLD] = CreateConVar("zr_respawn_team_zombie_world", "1", "Respawn player as a zombie if player was killed by the world. [Override: zr_respawn_team_zombie]"); + g_hCvarsList[CVAR_RESPAWN_TEAM_ZOMBIE_WORLD] = CreateConVar("zr_respawn_team_zombie_world", "1", "Respawn player as a zombie if player was a zombie and killed by world damage. [Override: zr_respawn_team_zombie]"); // =========================== diff --git a/src/zr/respawn.inc b/src/zr/respawn.inc index a2f33c2..e6a2c9a 100644 --- a/src/zr/respawn.inc +++ b/src/zr/respawn.inc @@ -159,7 +159,6 @@ bool:RespawnSpawnClient(client, bool:zombie = false, bool:zombieIfSuicide = fals } // Get respawn condition. - //new bool:zombieIfSuicide = GetConVarBool(g_hCvarsList[CVAR_RESPAWN_TEAM_ZOMBIE_WORLD]); new RespawnCondition:condition = RespawnToContition(zombie, zombieIfSuicide); // Trigger API forward. @@ -238,11 +237,14 @@ public Action:RespawnTimer(Handle:timer, any:client) return; } - // Get respawn team. - new bool:respawn_zombie = GetConVarBool(g_hCvarsList[CVAR_RESPAWN_TEAM_ZOMBIE]); + // Get whether player should respawn as zombie. + new bool:zombie = GetConVarBool(g_hCvarsList[CVAR_RESPAWN_TEAM_ZOMBIE]); + + // Get whether zombies died by suicide should respawn as zombies. + new bool:zombieIfSuicide = GetConVarBool(g_hCvarsList[CVAR_RESPAWN_TEAM_ZOMBIE_WORLD]); // Spawn player. - RespawnSpawnClient(client, respawn_zombie, true); + RespawnSpawnClient(client, zombie, zombieIfSuicide); } /**