Fix rcd obstruction check (#6963)

This commit is contained in:
Leon Friedrich
2022-03-03 02:38:19 +13:00
committed by GitHub
parent c344ab4bdf
commit 08a220d3e6

View File

@@ -160,14 +160,8 @@ namespace Content.Server.RCD.Systems
return false;
}
var coordinates = mapGrid.ToCoordinates(tile.GridIndices);
if (coordinates == EntityCoordinates.Invalid)
{
return false;
}
var unobstructed = eventArgs.Target == null
? _interactionSystem.InRangeUnobstructed(eventArgs.User, coordinates, popup: true)
? _interactionSystem.InRangeUnobstructed(eventArgs.User, mapGrid.GridTileToWorld(tile.GridIndices), popup: true)
: _interactionSystem.InRangeUnobstructed(eventArgs.User, eventArgs.Target.Value, popup: true);
if (!unobstructed)