Fix throwing non-hard entities (#16389)
This commit is contained in:
parent
636ee85e18
commit
17f217a4a3
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue