Fix throwing and pointing ignoring CanChangeDirection action blocker (#1474)

* Fix being able to change direction while buckled by throwing

* Fix being able to change direction while buckled by pointing

* Wrap diff in can turn check
This commit is contained in:
DrSmugleaf
2020-07-24 23:51:55 +02:00
committed by GitHub
parent a6931e5773
commit 3a4ad42c80
2 changed files with 12 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
using Content.Server.GameObjects.Components;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Physics;
using Robust.Shared.GameObjects.Components;
using Robust.Shared.Interfaces.GameObjects;
@@ -72,7 +73,10 @@ namespace Content.Server.Throw
projComp.User = throwSourceEnt;
projComp.IgnoreEntity(throwSourceEnt);
throwSourceEnt.Transform.LocalRotation = angle.GetCardinalDir().ToAngle();
if (ActionBlockerSystem.CanChangeDirection(throwSourceEnt))
{
throwSourceEnt.Transform.LocalRotation = angle.GetCardinalDir().ToAngle();
}
}
// scaling is handled elsewhere, this is just multiplying by 10 independent of timing as a fix until elsewhere values are updated