This commit is contained in:
Mister_Nebula 2021-10-23 21:17:49 +01:00
parent 6146a5300d
commit 54b2cca481
2 changed files with 14 additions and 0 deletions

View File

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

View File

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