Don't spin thrown pies (#4328)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using Content.Server.Interaction;
|
||||
using Content.Server.Items;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Log;
|
||||
@@ -43,7 +45,14 @@ namespace Content.Server.Throwing
|
||||
{
|
||||
entity.EnsureComponent<ThrownItemComponent>().Thrower = user;
|
||||
// Give it a l'il spin.
|
||||
physicsComponent.ApplyAngularImpulse(ThrowAngularImpulse);
|
||||
if (!entity.HasTag("NoSpinOnThrow"))
|
||||
{
|
||||
physicsComponent.ApplyAngularImpulse(ThrowAngularImpulse);
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.Transform.LocalRotation = direction.ToWorldAngle() - Math.PI;
|
||||
}
|
||||
|
||||
if (user != null)
|
||||
EntitySystem.Get<InteractionSystem>().ThrownInteraction(user, entity);
|
||||
|
||||
Reference in New Issue
Block a user