From 323d46bbc2bbb3ac5e61109d4d1a7b4b8f3719f5 Mon Sep 17 00:00:00 2001 From: zaCade Date: Mon, 3 Mar 2025 08:23:32 +0100 Subject: [PATCH] ZR: Allow DMG_BLAST and DMG_BURN if teams are different --- src/zr/damage.inc | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/zr/damage.inc b/src/zr/damage.inc index 2af82ef..56e6d21 100644 --- a/src/zr/damage.inc +++ b/src/zr/damage.inc @@ -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; }