diff --git a/NewHorizons/Builder/Props/DetailBuilder.cs b/NewHorizons/Builder/Props/DetailBuilder.cs index 69ff3c11..1a82eb4d 100644 --- a/NewHorizons/Builder/Props/DetailBuilder.cs +++ b/NewHorizons/Builder/Props/DetailBuilder.cs @@ -102,7 +102,6 @@ namespace NewHorizons.Builder.Props StreamingHandler.SetUpStreaming(prop, detail.keepLoaded ? null : sector); // Could check this in the for loop but I'm not sure what order we need to know about this in - var isTorch = prop.GetComponent() != null; isItem = false; foreach (var component in prop.GetComponentsInChildren(true)) @@ -120,7 +119,7 @@ namespace NewHorizons.Builder.Props { if (FixUnsectoredComponent(component)) continue; } - else FixSectoredComponent(component, sector, isTorch, detail.keepLoaded); + else FixSectoredComponent(component, sector, detail.keepLoaded); FixComponent(component, go, detail.ignoreSun); } @@ -219,7 +218,7 @@ namespace NewHorizons.Builder.Props /// /// Fix components that have sectors. Has a specific fix if there is a VisionTorchItem on the object. /// - private static void FixSectoredComponent(Component component, Sector sector, bool isTorch, bool keepLoaded) + private static void FixSectoredComponent(Component component, Sector sector, bool keepLoaded) { // keepLoaded should remove existing groups // renderers/colliders get enabled later so we dont have to do that here @@ -265,10 +264,10 @@ namespace NewHorizons.Builder.Props socket._sector = sector; } - // Fix slide reel - Softlocks if this object is a vision torch - else if(!isTorch && component is SlideCollectionContainer container) + // TODO: Fix low res reels (probably in VanillaFix since its a vanilla bug) + else if(component is SlideReelItem) { - sector.OnOccupantEnterSector.AddListener(_ => container.LoadStreamingTextures()); + } else if(component is NomaiRemoteCameraPlatform remoteCameraPlatform) diff --git a/NewHorizons/Main.cs b/NewHorizons/Main.cs index 6ef0e65f..3036f720 100644 --- a/NewHorizons/Main.cs +++ b/NewHorizons/Main.cs @@ -811,6 +811,12 @@ namespace NewHorizons return; } + if (LoadManager.GetCurrentScene() == OWScene.SolarSystem || LoadManager.GetCurrentScene() == OWScene.EyeOfTheUniverse) + { + // Slide reel unloading is tied to being removed from the sector, so we do that here to prevent a softlock + Locator.GetPlayerSectorDetector().RemoveFromAllSectors(); + } + if (IsChangingStarSystem) return; IsWarpingFromShip = warp; diff --git a/NewHorizons/NewHorizons.csproj b/NewHorizons/NewHorizons.csproj index 722d08c8..d3623e53 100644 --- a/NewHorizons/NewHorizons.csproj +++ b/NewHorizons/NewHorizons.csproj @@ -15,8 +15,8 @@ none - +