mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 11:40:52 +01:00
* Add robust method for no lerp Also updated rotation lerping. * a * a * Fix sleeping while I'm here + context * I hate contexts I hate contexts
33 lines
985 B
C#
33 lines
985 B
C#
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Maths;
|
|
|
|
namespace Robust.Client.GameObjects;
|
|
|
|
public sealed partial class TransformSystem
|
|
{
|
|
public override void SetLocalPosition(TransformComponent xform, Vector2 value)
|
|
{
|
|
xform._prevPosition = xform._localPosition;
|
|
xform._nextPosition = value;
|
|
xform.LerpParent = xform.ParentUid;
|
|
base.SetLocalPosition(xform, value);
|
|
ActivateLerp(xform);
|
|
}
|
|
|
|
public override void SetLocalPositionNoLerp(TransformComponent xform, Vector2 value)
|
|
{
|
|
xform._nextPosition = null;
|
|
xform.LerpParent = EntityUid.Invalid;
|
|
base.SetLocalPositionNoLerp(xform, value);
|
|
}
|
|
|
|
public override void SetLocalRotation(TransformComponent xform, Angle angle)
|
|
{
|
|
xform._prevRotation = xform._localRotation;
|
|
xform._nextRotation = angle;
|
|
xform.LerpParent = xform.ParentUid;
|
|
base.SetLocalRotation(xform, angle);
|
|
ActivateLerp(xform);
|
|
}
|
|
}
|