Bandaid InRangeUnoccluded length checks (#13568)

This commit is contained in:
metalgearsloth 2023-01-21 01:19:01 +11:00 committed by GitHub
parent 9ab1dad456
commit 112e8e33db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -162,7 +162,8 @@ namespace Content.Shared.Examine
var length = dir.Length;
// If range specified also check it
if (range > 0f && length > range) return false;
// TODO: This rounding check is here because the API is kinda eh
if (range > 0f && length > range + 0.01f) return false;
if (MathHelper.CloseTo(length, 0)) return true;