Replace GridEntityId with Owner (#12743)
This commit is contained in:
@@ -101,8 +101,8 @@ public sealed partial class ShuttleSystem
|
||||
|
||||
foreach (var other in _mapManager.FindGridsIntersecting(xform.MapID, bounds))
|
||||
{
|
||||
if (grid.Owner == other.GridEntityId ||
|
||||
!bodyQuery.TryGetComponent(other.GridEntityId, out var body) ||
|
||||
if (((Component) grid).Owner == other.Owner ||
|
||||
!bodyQuery.TryGetComponent(other.Owner, out var body) ||
|
||||
body.Mass < ShuttleFTLMassThreshold) continue;
|
||||
|
||||
reason = Loc.GetString("shuttle-console-proximity");
|
||||
@@ -485,10 +485,10 @@ public sealed partial class ShuttleSystem
|
||||
{
|
||||
foreach (var grid in _mapManager.FindGridsIntersecting(mapId, targetAABB))
|
||||
{
|
||||
if (!nearbyGrids.Add(grid.GridEntityId)) continue;
|
||||
if (!nearbyGrids.Add(grid.Owner)) continue;
|
||||
|
||||
targetAABB = targetAABB.Union(_transform.GetWorldMatrix(grid.GridEntityId, xformQuery)
|
||||
.TransformBox(Comp<MapGridComponent>(grid.GridEntityId).LocalAABB));
|
||||
targetAABB = targetAABB.Union(_transform.GetWorldMatrix(grid.Owner, xformQuery)
|
||||
.TransformBox(Comp<MapGridComponent>(grid.Owner).LocalAABB));
|
||||
}
|
||||
|
||||
// Can do proximity
|
||||
@@ -508,10 +508,10 @@ public sealed partial class ShuttleSystem
|
||||
foreach (var grid in _mapManager.GetAllGrids())
|
||||
{
|
||||
// Don't add anymore as it is irrelevant, but that doesn't mean we need to re-do existing work.
|
||||
if (nearbyGrids.Contains(grid.GridEntityId)) continue;
|
||||
if (nearbyGrids.Contains(grid.Owner)) continue;
|
||||
|
||||
targetAABB = targetAABB.Union(_transform.GetWorldMatrix(grid.GridEntityId, xformQuery)
|
||||
.TransformBox(Comp<MapGridComponent>(grid.GridEntityId).LocalAABB));
|
||||
targetAABB = targetAABB.Union(_transform.GetWorldMatrix(grid.Owner, xformQuery)
|
||||
.TransformBox(Comp<MapGridComponent>(grid.Owner).LocalAABB));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user