Fix for climb jank (#1803)
Player body was going to sleep, so now we spam WakeBody() at it.
This commit is contained in:
@@ -1,15 +1,8 @@
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.GameObjects.Components;
|
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Content.Shared.Maps;
|
|
||||||
using Robust.Shared.IoC;
|
|
||||||
using Robust.Shared.Interfaces.GameObjects;
|
|
||||||
using Content.Shared.GameObjects.Components.Movement;
|
using Content.Shared.GameObjects.Components.Movement;
|
||||||
using Content.Shared.GameObjects.EntitySystems;
|
using Content.Shared.GameObjects.EntitySystems;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Robust.Shared.Physics;
|
|
||||||
using System.Diagnostics;
|
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Movement
|
namespace Content.Server.GameObjects.Components.Movement
|
||||||
{
|
{
|
||||||
@@ -61,6 +54,11 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsClimbing)
|
||||||
|
{
|
||||||
|
Body.WakeBody();
|
||||||
|
}
|
||||||
|
|
||||||
if (!IsOnClimbableThisFrame && IsClimbing && _climbController == null)
|
if (!IsOnClimbableThisFrame && IsClimbing && _climbController == null)
|
||||||
{
|
{
|
||||||
IsClimbing = false;
|
IsClimbing = false;
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ namespace Content.Shared.Physics
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ControlledComponent.WakeBody();
|
||||||
|
|
||||||
if ((ControlledComponent.Owner.Transform.WorldPosition - _lastKnownPosition).Length <= 0.05f)
|
if ((ControlledComponent.Owner.Transform.WorldPosition - _lastKnownPosition).Length <= 0.05f)
|
||||||
{
|
{
|
||||||
_numTicksBlocked++;
|
_numTicksBlocked++;
|
||||||
@@ -61,7 +63,7 @@ namespace Content.Shared.Physics
|
|||||||
|
|
||||||
_lastKnownPosition = ControlledComponent.Owner.Transform.WorldPosition;
|
_lastKnownPosition = ControlledComponent.Owner.Transform.WorldPosition;
|
||||||
|
|
||||||
if ((ControlledComponent.Owner.Transform.WorldPosition - _movingTo.Value).Length <= 0.05f)
|
if ((ControlledComponent.Owner.Transform.WorldPosition - _movingTo.Value).Length <= 0.1f)
|
||||||
{
|
{
|
||||||
_movingTo = null;
|
_movingTo = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user