Fix a null reference exception (InteractionSystem) that crashed the hell out of the client.
This commit is contained in:
@@ -51,7 +51,9 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
var rayResults = _physicsManager.IntersectRayWithPredicate(coords.MapId, ray, dir.Length, predicate, true);
|
||||
if(!rayResults.DidHitObject || (insideBlockerValid && rayResults.DidHitObject && (rayResults.HitPos - otherCoords).Length < 1f))
|
||||
{
|
||||
_mapManager.TryFindGridAt(coords, out var mapGrid);
|
||||
|
||||
if (_mapManager.TryFindGridAt(coords, out var mapGrid) && mapGrid != null)
|
||||
{
|
||||
var srcPos = mapGrid.MapToGrid(coords);
|
||||
var destPos = new GridCoordinates(otherCoords, mapGrid);
|
||||
if (srcPos.InRange(_mapManager, destPos, range))
|
||||
@@ -59,6 +61,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user