Lets just use client everywhere.

This commit is contained in:
zaCade 2019-09-29 10:45:16 +02:00
parent c477d14bd4
commit 5eb739bef8

View File

@ -282,14 +282,12 @@ public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &dam
if(g_LastAttacker == attacker && g_LastVictim == client) if(g_LastAttacker == attacker && g_LastVictim == client)
return Plugin_Handled; return Plugin_Handled;
victim = client;
g_LastAttacker = attacker; g_LastAttacker = attacker;
g_LastVictim = victim; g_LastVictim = client;
int flags = ZR_KNOCKBACK_CUSTOM | ZR_KNOCKBACK_SCALE | ZR_KNOCKBACK_LIMITFORCE | ZR_KNOCKBACK_LIMITVEL; 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]; char sWeaponClassname[64];
if(inflictor == attacker) if(inflictor == attacker)
@ -316,7 +314,7 @@ public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &dam
// Don't damage kevlar. // Don't damage kevlar.
damagetype |= DMG_RADIATION; 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]) if(g_bNoSlowdown[client])
SetEntDataFloat(client, g_hVelocityModifier, flVelocityModifier, true); SetEntDataFloat(client, g_hVelocityModifier, flVelocityModifier, true);