ZR: Allow DMG_BLAST and DMG_BURN if teams are different

This commit is contained in:
zaCade 2025-03-03 08:23:32 +01:00
parent 38964c47ac
commit 323d46bbc2

View File

@ -340,8 +340,18 @@ public Action DamageOnTakeDamage(int client, int &attacker, int &inflictor, floa
return Plugin_Continue;
}
// Get zombie flag for each client.
new bool:clientzombie = InfectIsClientInfected(client);
new bool:attackerzombie = InfectIsClientInfected(attacker);
// If client is a zombie, then allow damage.
if (InfectIsClientInfected(client))
if (clientzombie)
{
return Plugin_Continue;
}
// If client and attacker are not on the same team, then allow damage.
if (clientzombie != attackerzombie)
{
return Plugin_Continue;
}
@ -364,8 +374,18 @@ public Action DamageOnTakeDamage(int client, int &attacker, int &inflictor, floa
return Plugin_Continue;
}
// Get zombie flag for each client.
new bool:clientzombie = InfectIsClientInfected(client);
new bool:attackerzombie = InfectIsClientInfected(attacker);
// If client is a zombie, then allow damage.
if (InfectIsClientInfected(client))
if (clientzombie)
{
return Plugin_Continue;
}
// If client and attacker are not on the same team, then allow damage.
if (clientzombie != attackerzombie)
{
return Plugin_Continue;
}