From 5eb739bef82dfa0548c6e9f1a62fde6b7ae23ebd Mon Sep 17 00:00:00 2001 From: zaCade Date: Sun, 29 Sep 2019 10:45:16 +0200 Subject: [PATCH] Lets just use client everywhere. --- DamageProxy/scripting/DamageProxy.sp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/DamageProxy/scripting/DamageProxy.sp b/DamageProxy/scripting/DamageProxy.sp index 95ccc450..994799e2 100644 --- a/DamageProxy/scripting/DamageProxy.sp +++ b/DamageProxy/scripting/DamageProxy.sp @@ -282,14 +282,12 @@ public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &dam if(g_LastAttacker == attacker && g_LastVictim == client) return Plugin_Handled; - victim = client; - g_LastAttacker = attacker; - g_LastVictim = victim; + g_LastVictim = client; int flags = ZR_KNOCKBACK_CUSTOM | ZR_KNOCKBACK_SCALE | ZR_KNOCKBACK_LIMITFORCE | ZR_KNOCKBACK_LIMITVEL; - if(g_bFullKnife[victim]) + if(g_bFullKnife[client]) { char sWeaponClassname[64]; if(inflictor == attacker) @@ -316,7 +314,7 @@ public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &dam // Don't damage kevlar. damagetype |= DMG_RADIATION; - SDKHooks_TakeDamage(victim, inflictor, attacker, damage, damagetype, weapon, damageForce, damagePosition, flags); + SDKHooks_TakeDamage(client, inflictor, attacker, damage, damagetype, weapon, damageForce, damagePosition, flags); if(g_bNoSlowdown[client]) SetEntDataFloat(client, g_hVelocityModifier, flVelocityModifier, true);