]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix wallmount vending machine dispense direction (#38112)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Fri, 6 Jun 2025 23:08:16 +0000 (01:08 +0200)
committerGitHub <noreply@github.com>
Fri, 6 Jun 2025 23:08:16 +0000 (19:08 -0400)
fix wallmount vending machine direction

Content.Server/VendingMachines/VendingMachineSystem.cs

index 954c5d6ca1ca41eec07c9e4acbf3a852f505b814..fda8f0682027f21cb94437143d1aca83070fd256 100644 (file)
@@ -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<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);
             }