Removed spawn protection on respawned zombies.

This commit is contained in:
richard 2008-12-28 02:22:41 +01:00
parent 0efabe1146
commit f447d3731e
2 changed files with 21 additions and 1 deletions

View File

@ -1,5 +1,6 @@
2008.12.27 - 2.5.1.18 2008.12.27 - 2.5.1.18
* Made zr_suicide_world_damage CVAR for respawning as zombie if a zombie was killed by the world. * Made zr_suicide_world_damage CVAR for respawning as zombie if a zombie was killed by the world.
* Removed spawn protection on respawned zombies.
2008.12.26 - 2.5.1.17 2008.12.26 - 2.5.1.17
* Finished teleporter admin commands; zr_teleport, zr_tele_saveloc, zr_tele_loc, zr_tele_abort. * Finished teleporter admin commands; zr_teleport, zr_tele_saveloc, zr_tele_loc, zr_tele_abort.

View File

@ -870,9 +870,27 @@ public Action:EndProtect(Handle:timer, any:index)
} }
} }
ProtectionAbort(client)
{
if (tHandles[client][TPROTECT] != INVALID_HANDLE)
{
KillTimer(tHandles[client][TPROTECT]);
tHandles[client][TPROTECT] = INVALID_HANDLE;
}
if (!IsClientInGame(client))
{
return;
}
pProtect[client] = false;
SetPlayerAlpha(client, 255);
SetPlayerSpeed(client, 300.0);
}
RespawnPlayer(client) RespawnPlayer(client)
{ {
if (!IsClientInGame(client)) if (!IsClientInGame(client))
{ {
return; return;
@ -896,6 +914,7 @@ RespawnPlayer(client)
if (GetConVarBool(gCvars[CVAR_SUICIDE_WORLD_DAMAGE]) && gKilledByWorld[client]) if (GetConVarBool(gCvars[CVAR_SUICIDE_WORLD_DAMAGE]) && gKilledByWorld[client])
{ {
ProtectionAbort(client);
Zombify(client, 0); Zombify(client, 0);
gKilledByWorld[client] = false; gKilledByWorld[client] = false;
} }