From e5fc6d4e5cc7bd25bbe597a95ff0a5615ba88c03 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Fri, 11 Mar 2022 05:40:52 -0800 Subject: [PATCH] meteors: don't both with initial state --- QSB/MeteorSync/WorldObjects/QSBMeteor.cs | 15 ++------------- .../WorldObjects/QSBMeteorLauncher.cs | 17 ++--------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/QSB/MeteorSync/WorldObjects/QSBMeteor.cs b/QSB/MeteorSync/WorldObjects/QSBMeteor.cs index d69e5ec8..140f74ea 100644 --- a/QSB/MeteorSync/WorldObjects/QSBMeteor.cs +++ b/QSB/MeteorSync/WorldObjects/QSBMeteor.cs @@ -1,24 +1,13 @@ -using Cysharp.Threading.Tasks; -using QSB.WorldSync; -using System.Threading; +using QSB.WorldSync; using UnityEngine; namespace QSB.MeteorSync.WorldObjects; public class QSBMeteor : WorldObject { - private QSBMeteorLauncher _qsbMeteorLauncher; - - public override async UniTask Init(CancellationToken ct) - { - var meteorLauncher = AttachedObject._suspendRoot.GetComponent(); - await UniTask.WaitUntil(() => QSBWorldSync.AllObjectsAdded, cancellationToken: ct); - _qsbMeteorLauncher = meteorLauncher.GetWorldObject(); - } - public override void SendInitialState(uint to) { - // todo SendInitialState + // we don't really need to sync initial state } public static bool IsSpecialImpact(GameObject go) => diff --git a/QSB/MeteorSync/WorldObjects/QSBMeteorLauncher.cs b/QSB/MeteorSync/WorldObjects/QSBMeteorLauncher.cs index bfcd552a..03da62d6 100644 --- a/QSB/MeteorSync/WorldObjects/QSBMeteorLauncher.cs +++ b/QSB/MeteorSync/WorldObjects/QSBMeteorLauncher.cs @@ -1,26 +1,13 @@ -using Cysharp.Threading.Tasks; -using QSB.Utility; -using QSB.WorldSync; -using System.Linq; -using System.Threading; +using QSB.WorldSync; using UnityEngine; namespace QSB.MeteorSync.WorldObjects; public class QSBMeteorLauncher : WorldObject { - private QSBMeteor[] _qsbMeteors; - - public override async UniTask Init(CancellationToken ct) - { - var meteors = AttachedObject._meteorPool.EmptyIfNull().Concat(AttachedObject._dynamicMeteorPool.EmptyIfNull()); - await UniTask.WaitUntil(() => QSBWorldSync.AllObjectsAdded, cancellationToken: ct); - _qsbMeteors = meteors.Select(x => x.GetWorldObject()).ToArray(); - } - public override void SendInitialState(uint to) { - // todo SendInitialState + // we don't really need to sync initial state } public void PreLaunchMeteor()