// Need direction relative to climber's parent.
var localDirection = (-parentRot).RotateVec(worldDirection);
- climbing.IsClimbing = true;
- var climbDuration = TimeSpan.FromSeconds(distance / climbing.TransitionRate);
- climbing.NextTransition = _timing.CurTime + climbDuration;
+ // On top of it already so just do it in place.
+ if (localDirection.LengthSquared() < 0.01f)
+ {
+ climbing.NextTransition = null;
+ }
+ // VirtualController over to the thing.
+ else
+ {
+ var climbDuration = TimeSpan.FromSeconds(distance / climbing.TransitionRate);
+ climbing.NextTransition = _timing.CurTime + climbDuration;
+
+ climbing.Direction = localDirection.Normalized() * climbing.TransitionRate;
+ _actionBlockerSystem.UpdateCanMove(uid);
+ }
- climbing.Direction = localDirection.Normalized() * climbing.TransitionRate;
+ climbing.IsClimbing = true;
Dirty(uid, climbing);
_audio.PlayPredicted(comp.FinishClimbSound, climbable, user);
- _actionBlockerSystem.UpdateCanMove(uid);
var startEv = new StartClimbEvent(climbable);
var climbedEv = new ClimbedOnEvent(uid, user);