diff --git a/QSB/TornadoSync/TornadoManager.cs b/QSB/TornadoSync/TornadoManager.cs index 1c99ebe4..aa48ac38 100644 --- a/QSB/TornadoSync/TornadoManager.cs +++ b/QSB/TornadoSync/TornadoManager.cs @@ -14,16 +14,6 @@ namespace QSB.TornadoSync { QSBWorldSync.Init(); - if (QSBCore.IsHost) - { - foreach (var transformSync in QSBWorldSync.GetUnityObjects()) - { - NetworkServer.Destroy(transformSync.gameObject); - } - } - - OccasionalTransformSync.Bodies.Clear(); - var gdBody = Locator._giantsDeep.GetOWRigidbody(); // cannon var cannon = Locator._orbitalProbeCannon.GetRequiredComponent(); @@ -33,7 +23,10 @@ namespace QSB.TornadoSync SpawnOccasional(proxy.transform.root.GetAttachedOWRigidbody(), gdBody); } - SpawnOccasional(cannon._probeBody, gdBody); + if (cannon._probeBody) + { + SpawnOccasional(cannon._probeBody, gdBody); + } // islands foreach (var island in QSBWorldSync.GetUnityObjects().SortDeterministic()) @@ -42,6 +35,19 @@ namespace QSB.TornadoSync } } + public override void UnbuildWorldObjects() + { + if (QSBCore.IsHost) + { + foreach (var transformSync in QSBWorldSync.GetUnityObjects()) + { + NetworkServer.Destroy(transformSync.gameObject); + } + } + + OccasionalTransformSync.Bodies.Clear(); + } + private static void SpawnOccasional(OWRigidbody body, OWRigidbody refBody) { OccasionalTransformSync.Bodies.Add((body, refBody));