From 6b5e99f5eb885faae202078167d8402350446f5a Mon Sep 17 00:00:00 2001 From: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Date: Mon, 29 Apr 2024 06:12:29 -0700 Subject: [PATCH] Make bullets inherit the velocity of the grid, not the gun or player (#27484) --- Content.Server/Weapons/Ranged/Systems/GunSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs index f5f4e3f199..7449b0c59e 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs @@ -105,7 +105,7 @@ public sealed partial class GunSystem : SharedGunSystem // Update shot based on the recoil toMap = fromMap.Position + angle.ToVec() * mapDirection.Length(); mapDirection = toMap - fromMap.Position; - var gunVelocity = Physics.GetMapLinearVelocity(gunUid); + var gunVelocity = Physics.GetMapLinearVelocity(fromEnt); // I must be high because this was getting tripped even when true. // DebugTools.Assert(direction != Vector2.Zero); -- 2.52.0