Fix throwing non-hard entities (#16389)
This commit is contained in:
@@ -93,7 +93,7 @@ public sealed class ThrowingSystem : EntitySystem
|
|||||||
comp.Thrower = user;
|
comp.Thrower = user;
|
||||||
|
|
||||||
// Give it a l'il spin.
|
// 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);
|
_physics.ApplyAngularImpulse(uid, ThrowAngularImpulse / physics.InvI, body: physics);
|
||||||
else
|
else
|
||||||
transform.LocalRotation = direction.ToWorldAngle() - Math.PI;
|
transform.LocalRotation = direction.ToWorldAngle() - Math.PI;
|
||||||
|
|||||||
Reference in New Issue
Block a user