Skip to content
Permalink
Browse files
Be slightly more lenient with the out-of-range shot detection
  • Loading branch information
RussellLVP committed Jul 22, 2020
1 parent d135781 commit 19b5d8e7e3431e5b77b9c77967348db464fef130
Showing 1 changed file with 2 additions and 1 deletion.
@@ -68,5 +68,6 @@ bool: IsLastShotOutOfRange(playerId, weaponId, hitType) {
new const Float: distance = VectorSize(
origin[0] - target[0], origin[1] - target[1], origin[2] - target[2]);

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

0 comments on commit 19b5d8e

Please sign in to comment.