fix wallmount vending machine direction
}
// 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<WallMountComponent>(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);
}