baba booey

This commit is contained in:
JohnCorby 2021-12-12 06:30:50 -08:00
parent a58f2a8bba
commit 2fe410082b

View File

@ -24,7 +24,7 @@ namespace QSB.TornadoSync.TransformSync
private int _bodyIndex = -1; private int _bodyIndex = -1;
private int _refBodyIndex = -1; private int _refBodyIndex = -1;
private Sector[] _sectors; private Sector[] _sectors;
private OWRigidbody[] _orbs; private OWRigidbody[] _childBodies;
public void InitBodyIndexes(OWRigidbody body, OWRigidbody refBody) public void InitBodyIndexes(OWRigidbody body, OWRigidbody refBody)
{ {
@ -41,9 +41,9 @@ namespace QSB.TornadoSync.TransformSync
_sectors = SectorManager.s_sectors _sectors = SectorManager.s_sectors
.Where(x => x._attachedOWRigidbody == AttachedObject).ToArray(); .Where(x => x._attachedOWRigidbody == AttachedObject).ToArray();
_orbs = QSBWorldSync.OldOrbList _childBodies = CenterOfTheUniverse.s_rigidbodies
.Where(x => _sectors.Contains(x._sector)) .Where(x => x._origParentBody == AttachedObject)
.Select(x => x._orbBody).ToArray(); .ToArray();
} }
public override void SerializeTransform(QNetworkWriter writer, bool initialState) public override void SerializeTransform(QNetworkWriter writer, bool initialState)
@ -124,9 +124,9 @@ namespace QSB.TornadoSync.TransformSync
{ {
QueueMove(Locator._probe._owRigidbody); QueueMove(Locator._probe._owRigidbody);
} }
foreach (var orb in _orbs) foreach (var child in _childBodies)
{ {
QueueMove(orb); QueueMove(child);
} }
var pos = ReferenceTransform.DecodePos(transform.position); var pos = ReferenceTransform.DecodePos(transform.position);