From f274dc6526cc9c570784e698382df4686918d2f2 Mon Sep 17 00:00:00 2001 From: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Date: Sat, 7 Jun 2025 01:08:16 +0200 Subject: [PATCH] fix wallmount vending machine dispense direction (#38112) fix wallmount vending machine direction --- Content.Server/VendingMachines/VendingMachineSystem.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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); } -- 2.51.2