Fix Disposals Ejections (#33468)
* Fix disposals. * Rename properly --------- Co-authored-by: sleepyyapril <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>
This commit is contained in:
@@ -135,12 +135,13 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
else
|
||||
{
|
||||
_xformSystem.AttachToGridOrMap(entity, xform);
|
||||
var direction = holder.CurrentDirection == Direction.Invalid ? holder.PreviousDirection : holder.CurrentDirection;
|
||||
|
||||
if (holder.PreviousDirection != Direction.Invalid && _xformQuery.TryGetComponent(xform.ParentUid, out var parentXform))
|
||||
if (direction != Direction.Invalid && _xformQuery.TryGetComponent(gridUid, out var gridXform))
|
||||
{
|
||||
var direction = holder.PreviousDirection.ToAngle();
|
||||
direction += _xformSystem.GetWorldRotation(parentXform);
|
||||
_throwing.TryThrow(entity, direction.ToWorldVec() * 3f, 10f);
|
||||
var directionAngle = direction.ToAngle();
|
||||
directionAngle += _xformSystem.GetWorldRotation(gridXform);
|
||||
_throwing.TryThrow(entity, directionAngle.ToWorldVec() * 3f, 10f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user