change ShouldMovePlayer again

This commit is contained in:
JohnCorby 2023-03-08 15:48:50 -08:00
parent 90d5a01471
commit 72aa8c5f57
3 changed files with 6 additions and 11 deletions

View File

@ -11,10 +11,6 @@ namespace QSB.EchoesOfTheEye.RaftSync.TransformSync;
public class RaftTransformSync : UnsectoredRigidbodySync, ILinkedNetworkBehaviour
{
private bool ShouldMovePlayer =>
(
Locator.GetPlayerController().GetGroundBody() == null ||
Locator.GetPlayerController().GetGroundBody() == AttachedRigidbody
) &&
Vector3.Distance(AttachedTransform.position, Locator.GetPlayerBody().GetPosition()) < 10;
protected override bool UseInterpolation => !ShouldMovePlayer;

View File

@ -14,9 +14,9 @@ using UnityEngine;
namespace QSB.QuantumSync.WorldObjects;
/// <summary>
/// TODO: just use OnSectorOccupantsUpdated instead of this shape bullshit
///
/// TODO: make it part of the ad-hoc owner interface
///
/// TODO: make it so only players in the sector (which sector?) are checked for visibility
/// </summary>
internal abstract class QSBQuantumObject<T> : WorldObject<T>, IQSBQuantumObject
where T : QuantumObject

View File

@ -1,3 +1,5 @@
using QSB.HUD;
using QSB.Player;
using QSB.Syncs.Sectored.Rigidbodies;
using QSB.Utility;
using UnityEngine;
@ -124,10 +126,7 @@ public class ShipTransformSync : SectoredRigidbodySync
private bool ShouldMovePlayer =>
(
Locator.GetPlayerController().GetGroundBody() == null ||
Locator.GetPlayerController().GetGroundBody() == AttachedRigidbody
) &&
Vector3.Distance(AttachedTransform.position, Locator.GetPlayerBody().GetPosition()) < 100;
QSBPlayerManager.LocalPlayer.HUDBox.PlanetIcon == HUDIcon.SPACE // huge hack, idc
&& Vector3.Distance(AttachedTransform.position, Locator.GetPlayerBody().GetPosition()) < 100;
protected override bool UseInterpolation => !ShouldMovePlayer;
}