ZombieManager: wrong spot for protection

This commit is contained in:
dogan 2020-08-06 04:35:25 +02:00
parent 2e9f3b1cca
commit da1e713c96

View File

@ -262,11 +262,8 @@ public Action OnPlayerHurt(Event event, const char[] name, bool dontBroadcast)
int attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
int damage = GetEventInt(event, "dmg_health");
if(!IsClientInGame(client) || !IsPlayerAlive(client) || !ZR_IsClientZombie(client) || GetClientHealth(client) <= g_iZHPMax[client])
{
g_iZShield[client] = 0;
if(!IsClientInGame(client) || !IsPlayerAlive(client) || !ZR_IsClientZombie(client))
return Plugin_Continue;
}
if(g_iZShield[client] > 0 && attacker != 0)
{
@ -417,6 +414,8 @@ public Action Timer_HandleHPShield(Handle timer)
g_iZShield[i] = 0; //disabled by convar
else if(bHasItem)
g_iZShield[i] = 0; //zombies with items
else if(GetClientHealth(i) < g_iZHPMax[i]) //zombies with no max hp
g_iZShield[i] = 0;
else if(GetClientHealth(i) >= g_iZHPMax[i] && bNemesis)
g_iZShield[i] = 0; //disabled for now on nemesis
//g_iZShield[i] = g_iZShield[i] + 12; // health_regen_amount = 12