Work around transform anchoring in construction.

This commit is contained in:
Vera Aguilera Puerto
2021-06-29 21:23:00 +02:00
parent bc7b315b18
commit 4ce05a9b75

View File

@@ -457,9 +457,16 @@ namespace Content.Server.Construction
return;
}
// We do this to be able to move the construction to its proper position in case it's anchored...
// Oh wow transform anchoring is amazing wow I love it!!!!
var wasAnchored = structure.Transform.Anchored;
structure.Transform.Anchored = false;
structure.Transform.Coordinates = ev.Location;
structure.Transform.LocalRotation = constructionPrototype.CanRotate ? ev.Angle : Angle.Zero;
structure.Transform.Anchored = wasAnchored;
RaiseNetworkEvent(new AckStructureConstructionMessage(ev.Ack));
Cleanup();