Fix throwing non-hard entities (#16389)

This commit is contained in:
metalgearsloth 2023-05-13 23:45:59 +10:00 committed by GitHub
parent 636ee85e18
commit 17f217a4a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View 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;