mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 00:27:59 +00:00
Removes duplicate range check in InRangeUnobstructed(#6358)
This commit is contained in:
@@ -292,12 +292,11 @@ namespace Content.Shared.Interaction
|
||||
Ignored? predicate = null,
|
||||
bool ignoreInsideBlocker = false)
|
||||
{
|
||||
if (!origin.InRange(other, range)) return false;
|
||||
if (range > 0f && !origin.InRange(other, range)) return false;
|
||||
|
||||
var dir = other.Position - origin.Position;
|
||||
|
||||
if (dir.LengthSquared.Equals(0f)) return true;
|
||||
if (range > 0f && !(dir.LengthSquared <= range * range)) return false;
|
||||
|
||||
predicate ??= _ => false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user