]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make bullets inherit the velocity of the grid, not the gun or player (#27484)
authorDrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Mon, 29 Apr 2024 13:12:29 +0000 (06:12 -0700)
committerGitHub <noreply@github.com>
Mon, 29 Apr 2024 13:12:29 +0000 (23:12 +1000)
Content.Server/Weapons/Ranged/Systems/GunSystem.cs

index f5f4e3f199556f19b83cbe4be54401004ee686d0..7449b0c59e99a4032d6471814c9e8cb4e4614e81 100644 (file)
@@ -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);