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); } /**