Skip to content

Commit 19b5d8e

Browse files
committed
Be slightly more lenient with the out-of-range shot detection
1 parent d135781 commit 19b5d8e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pawn/Driver/Abuse/WeaponDistanceBlocker.pwn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,6 @@ bool: IsLastShotOutOfRange(playerId, weaponId, hitType) {
6868
new const Float: distance = VectorSize(
6969
origin[0] - target[0], origin[1] - target[1], origin[2] - target[2]);
7070

71-
return kWeaponRange[weaponId] < distance;
71+
// Allow a 10% divergence to reduce the number of false positives.
72+
return kWeaponRange[weaponId] < floatdiv(distance, 1.1);
7273
}

0 commit comments

Comments
 (0)