diff --git a/QSB/EchoesOfTheEye/Ghosts/GhostManager.cs b/QSB/EchoesOfTheEye/Ghosts/GhostManager.cs index acf9c46c..034aaa72 100644 --- a/QSB/EchoesOfTheEye/Ghosts/GhostManager.cs +++ b/QSB/EchoesOfTheEye/Ghosts/GhostManager.cs @@ -1,5 +1,6 @@ using Cysharp.Threading.Tasks; using QSB.EchoesOfTheEye.Ghosts.WorldObjects; +using QSB.Utility; using QSB.WorldSync; using System.Collections.Generic; using System.Linq; @@ -23,7 +24,7 @@ internal class GhostManager : WorldObjectManager { QSBWorldSync.Init(); QSBWorldSync.Init(); - QSBWorldSync.Init(); + QSBWorldSync.Init(QSBWorldSync.GetUnityObjects().Where(x => x.gameObject.activeSelf).SortDeterministic()); _hotelDirector = QSBWorldSync.GetUnityObjects().First(); _partyPathDirector = QSBWorldSync.GetUnityObjects().First(); diff --git a/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostBrain.cs b/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostBrain.cs index 05095214..0fcbc69c 100644 --- a/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostBrain.cs +++ b/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostBrain.cs @@ -133,7 +133,10 @@ public class QSBGhostBrain : WorldObject AttachedObject._controller = AttachedObject.GetComponent(); AttachedObject._sensors = AttachedObject.GetComponent(); _data = new(); - _data.threatAwareness = AttachedObject._data.threatAwareness; + if (AttachedObject._data != null) + { + _data.threatAwareness = AttachedObject._data.threatAwareness; + } } public void Start()