Nullable grid Uid (#8798)
This commit is contained in:
@@ -47,9 +47,13 @@ namespace Content.Server.Interaction
|
||||
}
|
||||
|
||||
var mapManager = IoCManager.Resolve<IMapManager>();
|
||||
var playerGrid = _entities.GetComponent<TransformComponent>(attached).GridEntityId;
|
||||
var mapGrid = mapManager.GetGrid(playerGrid);
|
||||
var playerPosition = _entities.GetComponent<TransformComponent>(attached).Coordinates;
|
||||
var xform = _entities.GetComponent<TransformComponent>(attached);
|
||||
var playerGrid = xform.GridUid;
|
||||
|
||||
if (!mapManager.TryGetGrid(playerGrid, out var mapGrid))
|
||||
return;
|
||||
|
||||
var playerPosition = xform.Coordinates;
|
||||
var tileDefinitionManager = IoCManager.Resolve<ITileDefinitionManager>();
|
||||
|
||||
for (var i = -radius; i <= radius; i++)
|
||||
|
||||
Reference in New Issue
Block a user