Made zr_suicide_world_damage CVAR for respawning as zombie if a zombie was killed by the world.

This commit is contained in:
richard
2008-12-28 00:50:39 +01:00
parent ef8a7e04b7
commit 0efabe1146
7 changed files with 26 additions and 15 deletions

View File

@ -872,6 +872,7 @@ public Action:EndProtect(Handle:timer, any:index)
RespawnPlayer(client)
{
if (!IsClientInGame(client))
{
return;
@ -886,10 +887,17 @@ RespawnPlayer(client)
decl String:team[32];
GetConVarString(gCvars[CVAR_RESPAWN_TEAM], team, sizeof(team));
if (StrEqual(team, "zombie", false))
{
Zombify(client, 0);
return;
}
if (GetConVarBool(gCvars[CVAR_SUICIDE_WORLD_DAMAGE]) && gKilledByWorld[client])
{
Zombify(client, 0);
gKilledByWorld[client] = false;
}
}