QSBSectorManager: update reference sector only when attached object is active

This commit is contained in:
JohnCorby 2022-02-25 02:17:21 -08:00
parent 005f6886ab
commit 4ce58220b1
2 changed files with 2 additions and 11 deletions

View File

@ -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);
}

View File

@ -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();