make it work for other rafts

This commit is contained in:
JohnCorby 2023-09-19 16:46:31 -07:00
parent 2e20c82d1f
commit ae62a11aac

View File

@ -15,8 +15,8 @@ public class RaftTransformSync : UnsectoredRigidbodySync, ILinkedNetworkBehaviou
/// or in air near the raft
/// </summary>
private bool ShouldMovePlayer =>
(_worldObject.AttachedObject is RaftController raft && raft.IsPlayerRiding()) ||
(!Locator.GetPlayerController().IsGrounded() && Vector3.Distance(AttachedTransform.position, Locator.GetPlayerBody().GetPosition()) < 10);
Locator.GetPlayerController().GetGroundBody() == AttachedRigidbody ||
(Locator.GetPlayerController().GetGroundBody() == null && Vector3.Distance(AttachedTransform.position, Locator.GetPlayerBody().GetPosition()) < 10);
protected override bool UseInterpolation => !ShouldMovePlayer;
private float _lastSetPositionTime;