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

@ -392,7 +392,7 @@ public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new index = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
SetPlayerFOV(index, DEFAULT_FOV);
ExtinguishEntity(index);
@ -436,20 +436,21 @@ public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
new bonus = GetClassKillBonus(pClass[index]);
AddPlayerScore(attacker, bonus);
}
if (!IsClientPlayer(attacker))
{
gKilledByWorld[index] = true;
}
else
{
gKilledByWorld[index] = false;
}
}
new debug_val = GetConVarInt(gCvars[CVAR_DEBUG]);
new String:debug_msg[64];
for (new x = 0; x < MAXTIMERS; x++)
{
if (tHandles[index][x] != INVALID_HANDLE)
{
if (debug_val > 1)
{
Format(debug_msg, sizeof(debug_msg), "PlayerDeath - Killing timer %i with handle %x.", x, tHandles[index][x]);
ZR_DebugPrintToConsole(0, debug_msg);
}
KillTimer(tHandles[index][x]);
tHandles[index][x] = INVALID_HANDLE;
}