]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix throwing non-hard entities (#16389)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Sat, 13 May 2023 13:45:59 +0000 (23:45 +1000)
committerGitHub <noreply@github.com>
Sat, 13 May 2023 13:45:59 +0000 (23:45 +1000)
Content.Shared/Throwing/ThrowingSystem.cs

index 3035411148294a918c9c1ac8d71610806e0bf8df..44cfdc33fb71f4b079000478a6e7842fa5dab46b 100644 (file)
@@ -93,7 +93,7 @@ public sealed class ThrowingSystem : EntitySystem
         comp.Thrower = user;
 
         // Give it a l'il spin.
-        if (!tagQuery.TryGetComponent(uid, out var tag) || !_tagSystem.HasTag(tag, "NoSpinOnThrow"))
+        if (physics.InvI > 0f && (!tagQuery.TryGetComponent(uid, out var tag) || !_tagSystem.HasTag(tag, "NoSpinOnThrow")))
             _physics.ApplyAngularImpulse(uid, ThrowAngularImpulse / physics.InvI, body: physics);
         else
             transform.LocalRotation = direction.ToWorldAngle() - Math.PI;