diff --git a/Content.Server/VendingMachines/VendingMachineSystem.cs b/Content.Server/VendingMachines/VendingMachineSystem.cs index 954c5d6ca1..fda8f06820 100644 --- a/Content.Server/VendingMachines/VendingMachineSystem.cs +++ b/Content.Server/VendingMachines/VendingMachineSystem.cs @@ -227,14 +227,13 @@ namespace Content.Server.VendingMachines } // Default spawn coordinates - var spawnCoordinates = Transform(uid).Coordinates; + var xform = Transform(uid); + var spawnCoordinates = xform.Coordinates; //Make sure the wallvends spawn outside of the wall. - if (TryComp(uid, out var wallMountComponent)) { - - var offset = wallMountComponent.Direction.ToWorldVec() * WallVendEjectDistanceFromWall; + var offset = (wallMountComponent.Direction + xform.LocalRotation - Math.PI / 2).ToVec() * WallVendEjectDistanceFromWall; spawnCoordinates = spawnCoordinates.Offset(offset); }