Fixed respawn module ignoring zr_respawn_team_zombie_world cvar. Improved description of zr_respawn_team_zombie_world.

This commit is contained in:
Richard Helgeby 2013-07-14 12:35:09 +02:00
parent 28e54c36a7
commit c61d29fd63
3 changed files with 8 additions and 6 deletions

View File

@ -635,7 +635,7 @@ zr_respawn_delay "1"
// Default: "1" // Default: "1"
zr_respawn_team_zombie "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" // Default: "1"
zr_respawn_team_zombie_world "1" zr_respawn_team_zombie_world "1"

View File

@ -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] = 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_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] = 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]");
// =========================== // ===========================

View File

@ -159,7 +159,6 @@ bool:RespawnSpawnClient(client, bool:zombie = false, bool:zombieIfSuicide = fals
} }
// Get respawn condition. // Get respawn condition.
//new bool:zombieIfSuicide = GetConVarBool(g_hCvarsList[CVAR_RESPAWN_TEAM_ZOMBIE_WORLD]);
new RespawnCondition:condition = RespawnToContition(zombie, zombieIfSuicide); new RespawnCondition:condition = RespawnToContition(zombie, zombieIfSuicide);
// Trigger API forward. // Trigger API forward.
@ -238,11 +237,14 @@ public Action:RespawnTimer(Handle:timer, any:client)
return; return;
} }
// Get respawn team. // Get whether player should respawn as zombie.
new bool:respawn_zombie = GetConVarBool(g_hCvarsList[CVAR_RESPAWN_TEAM_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. // Spawn player.
RespawnSpawnClient(client, respawn_zombie, true); RespawnSpawnClient(client, zombie, zombieIfSuicide);
} }
/** /**