diff --git a/changelog.txt b/changelog.txt index 216830c..2fa15f5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,6 @@ 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. + * Removed spawn protection on respawned zombies. 2008.12.26 - 2.5.1.17 * Finished teleporter admin commands; zr_teleport, zr_tele_saveloc, zr_tele_loc, zr_tele_abort. diff --git a/src/zr/zombie.inc b/src/zr/zombie.inc index b31fca9..5e9b3d5 100644 --- a/src/zr/zombie.inc +++ b/src/zr/zombie.inc @@ -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) { - if (!IsClientInGame(client)) { return; @@ -896,6 +914,7 @@ RespawnPlayer(client) if (GetConVarBool(gCvars[CVAR_SUICIDE_WORLD_DAMAGE]) && gKilledByWorld[client]) { + ProtectionAbort(client); Zombify(client, 0); gKilledByWorld[client] = false; }