mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 01:13:05 +00:00
change ShouldMovePlayer again
This commit is contained in:
parent
90d5a01471
commit
72aa8c5f57
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user