From: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Date: Fri, 6 Jun 2025 23:08:16 +0000 (+0200) Subject: fix wallmount vending machine dispense direction (#38112) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=f274dc6526cc9c570784e698382df4686918d2f2;p=space-station-14.git fix wallmount vending machine dispense direction (#38112) fix wallmount vending machine direction --- 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); }