From 308a83e6f3f344efe69429f31337a06a5362e68d Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 10 Oct 2022 17:26:14 -0700 Subject: [PATCH] LinkShipLogFacts before SetMindSlideCollection to prevent NRE --- NewHorizons/Builder/Props/ProjectionBuilder.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/NewHorizons/Builder/Props/ProjectionBuilder.cs b/NewHorizons/Builder/Props/ProjectionBuilder.cs index bcd4c663..de4060bd 100644 --- a/NewHorizons/Builder/Props/ProjectionBuilder.cs +++ b/NewHorizons/Builder/Props/ProjectionBuilder.cs @@ -321,14 +321,10 @@ namespace NewHorizons.Builder.Props var mindSlideCollection = standingTorch.AddComponent(); mindSlideCollection._slideCollectionContainer = slideCollectionContainer; - // Make sure that these slides play when the player wanders into the beam - slideCollectionContainer._initialized = true; // Hack to avoid initialization in the following call (it would throw NRE) - mindSlideProjector.SetMindSlideCollection(mindSlideCollection); - slideCollectionContainer._initialized = false; - - LinkShipLogFacts(info, slideCollectionContainer); + mindSlideProjector.SetMindSlideCollection(mindSlideCollection); + return standingTorch; }