Sync station rotation with a spawned salvage rotation (#5998)

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
Co-authored-by: Alexander Evgrashin <evgrashin.adl@gmail.com>
This commit is contained in:
Alex Evgrashin
2022-01-04 00:32:16 +03:00
committed by GitHub
parent 437ed1dd90
commit c5a98129ff

View File

@@ -215,10 +215,9 @@ namespace Content.Server.Salvage
{
coords = new EntityCoordinates(smc.Owner, smc.Offset).ToMap(EntityManager);
var grid = tsc.GridID;
if (grid != GridId.Invalid)
if (_mapManager.TryGetGrid(grid, out var magnetGrid))
{
// Has a valid grid - synchronize angle so that salvage doesn't have to deal with cross-grid manipulation issues
angle = tsc.WorldRotation;
angle = magnetGrid.WorldRotation;
}
return true;
}