From 4ce58220b13019cddd2117dae66ede8635fd22d9 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Fri, 25 Feb 2022 02:17:21 -0800 Subject: [PATCH] QSBSectorManager: update reference sector only when attached object is active --- QSB/SectorSync/QSBSectorManager.cs | 3 ++- QSB/Syncs/SyncBase.cs | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/QSB/SectorSync/QSBSectorManager.cs b/QSB/SectorSync/QSBSectorManager.cs index 08db90b4..aaa09fba 100644 --- a/QSB/SectorSync/QSBSectorManager.cs +++ b/QSB/SectorSync/QSBSectorManager.cs @@ -46,7 +46,8 @@ public class QSBSectorManager : WorldObjectManager foreach (var sync in SectoredSyncs) { if (sync.hasAuthority - && sync.IsValid) + && sync.IsValid + && sync.AttachedTransform.gameObject.activeInHierarchy) { UpdateReferenceSector(sync); } diff --git a/QSB/Syncs/SyncBase.cs b/QSB/Syncs/SyncBase.cs index d7bc40e2..2229ec28 100644 --- a/QSB/Syncs/SyncBase.cs +++ b/QSB/Syncs/SyncBase.cs @@ -96,11 +96,6 @@ public abstract class SyncBase : QSBNetworkTransform return false; } - if (ReferenceTransform == Locator.GetRootTransform()) - { - return false; - } - return true; } @@ -237,11 +232,6 @@ public abstract class SyncBase : QSBNetworkTransform return; } - if (ReferenceTransform && ReferenceTransform.position == Vector3.zero) - { - DebugLog.ToConsole($"Warning - {this}'s ReferenceTransform is at (0,0,0). ReferenceTransform:{ReferenceTransform.name}", MessageType.Warning); - } - if (!hasAuthority && UseInterpolation) { Interpolate();