diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 22ce9a927..c70525218 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -35,7 +35,7 @@ END TEMPLATE--> ### Breaking changes -*None yet* +* Reversed an undocumented breaking change from `v267.3.0`: entity spawning with a `MapCoordinates` now takes the rotation as relative to the map again instead of relative to the grid the entity was attached to. ### New features diff --git a/Robust.Shared/GameObjects/EntityManager.cs b/Robust.Shared/GameObjects/EntityManager.cs index 349e648fc..4c8e1d5e8 100644 --- a/Robust.Shared/GameObjects/EntityManager.cs +++ b/Robust.Shared/GameObjects/EntityManager.cs @@ -366,7 +366,8 @@ namespace Robust.Shared.GameObjects && meta.EntityLifeStage < EntityLifeStage.Terminating) { coords = new EntityCoordinates(gridUid, _mapSystem.WorldToLocal(gridUid, grid, coordinates.Position)); - _xforms.SetCoordinates(newEntity, transform, coords, rotation, unanchor: false); + var relativeRotation = rotation - _xforms.GetWorldRotation(gridUid); + _xforms.SetCoordinates(newEntity, transform, coords, relativeRotation, unanchor: false); } else { diff --git a/Robust.Shared/GameObjects/IEntityManager.cs b/Robust.Shared/GameObjects/IEntityManager.cs index c24308bc1..d0763cf1b 100644 --- a/Robust.Shared/GameObjects/IEntityManager.cs +++ b/Robust.Shared/GameObjects/IEntityManager.cs @@ -104,7 +104,7 @@ namespace Robust.Shared.GameObjects /// Name of the to spawn. /// Coordinates to place the newly spawned entity. /// Overrides to add or remove components that differ from the prototype. - /// Local rotation to set the newly spawned entity to. + /// World rotation to set the newly spawned entity to. /// A new uninitialized entity. /// If there is a grid at the , the entity will be parented to the grid. /// Otherwise, it will be parented to the map.