diff --git a/QSB/Syncs/Sectored/BaseSectoredSync.cs b/QSB/Syncs/Sectored/BaseSectoredSync.cs index f52a6239..5d645415 100644 --- a/QSB/Syncs/Sectored/BaseSectoredSync.cs +++ b/QSB/Syncs/Sectored/BaseSectoredSync.cs @@ -67,6 +67,12 @@ namespace QSB.Syncs.Sectored { if (_sectorIdWaitingSlot == int.MinValue) { + if (ReferenceSector != null && ReferenceSector.Transform != ReferenceTransform) + { + DebugLog.ToConsole($"Warning - {_logName} : ReferenceSector.Transform was different to ReferenceTransform. Correcting...", OWML.Common.MessageType.Warning); + SetReferenceTransform(ReferenceSector.Transform); + } + base.Update(); return; } diff --git a/QSB/Syncs/SyncBase.cs b/QSB/Syncs/SyncBase.cs index 558b4cf2..1c98238c 100644 --- a/QSB/Syncs/SyncBase.cs +++ b/QSB/Syncs/SyncBase.cs @@ -223,6 +223,14 @@ namespace QSB.Syncs return; } + if (ShouldReparentAttachedObject + && !HasAuthority + && AttachedObject.transform.parent != ReferenceTransform) + { + DebugLog.ToConsole($"Warning : {_logName} : AttachedObject's parent is different to ReferenceTransform. Correcting...", MessageType.Warning); + ReparentAttachedObject(ReferenceTransform); + } + UpdateTransform(); base.Update();