From 86fa334020dc356f7edad354dc8895ae8ab66962 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 28 Mar 2021 19:08:18 +0100 Subject: [PATCH] fix _poolT on slave not updating smoothly and fix holograms not appearing --- QSB/PoolSync/CustomNomaiRemoteCameraPlatform.cs | 17 +++++++++-------- QSB/QSBCore.cs | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/QSB/PoolSync/CustomNomaiRemoteCameraPlatform.cs b/QSB/PoolSync/CustomNomaiRemoteCameraPlatform.cs index 7ebf6bfe..0e2cad5d 100644 --- a/QSB/PoolSync/CustomNomaiRemoteCameraPlatform.cs +++ b/QSB/PoolSync/CustomNomaiRemoteCameraPlatform.cs @@ -92,6 +92,7 @@ namespace QSB.PoolSync _hologramGroup.SetActive(false); UpdateRendererFade(); _transitionStone.SetActive(false); + _hologramGroup.transform.SetParent(null); } private void Start() @@ -258,7 +259,7 @@ namespace QSB.PoolSync return; } UpdatePoolRenderer(); - _slavePlatform._poolT = target; + _slavePlatform._poolT = _poolT; _slavePlatform.UpdatePoolRenderer(); } @@ -338,11 +339,6 @@ namespace QSB.PoolSync DebugLog.ToConsole($"Error - Gameobject for {item.Key.PlayerId} in _playerToHologram is null!", MessageType.Error); continue; } - if (!item.Value.activeInHierarchy) - { - DebugLog.ToConsole($"Error - Gameobject for {item.Key.PlayerId} is inactive!", MessageType.Error); - continue; - } var hologram = item.Value.transform.GetChild(0); hologram.position = TransformPoint(item.Key.Body.transform.position, this, _slavePlatform); hologram.rotation = TransformRotation(item.Key.Body.transform.rotation, this, _slavePlatform); @@ -400,7 +396,7 @@ namespace QSB.PoolSync { Debug.LogError("Shared stone with Remote Camera ID: " + _sharedStone.GetRemoteCameraID() + " has no registered camera platform!"); } - if (_slavePlatform == this || !_slavePlatform.gameObject.activeInHierarchy) + if (_slavePlatform == this || !_slavePlatform.gameObject.activeSelf) { _sharedStone = null; _slavePlatform = null; @@ -633,7 +629,7 @@ namespace QSB.PoolSync return; } var hologram = _playerToHologram.First(x => x.Key == player).Value; - if (hologram.activeInHierarchy) + if (hologram.activeSelf) { OnRemotePlayerExit(id); } @@ -690,6 +686,11 @@ namespace QSB.PoolSync return; } _playerToHologram[player].SetActive(false); + + if (!_anyoneStillOnPlatform) + { + _hologramGroup.SetActive(false); + } } public enum CameraState diff --git a/QSB/QSBCore.cs b/QSB/QSBCore.cs index b1169b3a..749f9b6f 100644 --- a/QSB/QSBCore.cs +++ b/QSB/QSBCore.cs @@ -8,6 +8,7 @@ using QSB.ItemSync; using QSB.OrbSync; using QSB.Patches; using QSB.Player; +using QSB.PoolSync; using QSB.QuantumSync; using QSB.QuantumSync.WorldObjects; using QSB.SectorSync; @@ -104,6 +105,7 @@ namespace QSB gameObject.AddComponent(); gameObject.AddComponent(); gameObject.AddComponent(); + gameObject.AddComponent(); DebugBoxManager.Init();