ignore z-axis for anti-longknife, lagcompensation is really needed here.

This commit is contained in:
BotoX 2016-08-18 06:47:48 +02:00
parent 022e232842
commit 37a7224d6c

View File

@ -295,6 +295,10 @@ public Action:DamageOnTakeDamage(client, &attacker, &inflictor, &Float:damage, &
GetClientAbsOrigin(client, clientPosition); GetClientAbsOrigin(client, clientPosition);
GetClientAbsOrigin(attacker, attackerPosition); GetClientAbsOrigin(attacker, attackerPosition);
// ignore z axis
clientPosition[2] = 0.0;
attackerPosition[2] = 0.0;
new Float:distance = GetVectorDistance(clientPosition, attackerPosition); new Float:distance = GetVectorDistance(clientPosition, attackerPosition);
// Block infection if distance is higher than allowed. // Block infection if distance is higher than allowed.